The poskim write: It’s forbidden for one who borrows money to attend the chasunah or bar mitzvah of the lender, unless he would have done so anyway regardless of the loan. It’s very possible that attending the lenders simcha is considered doing something in public, which is significantly worse than doing something in private (see Shulchan Aruch 160:7). The same thing is with paying a shivah visit, if the borrower wouldn’t have normally gone, he can’t suddenly go now. (Chelkas Binyomin 160:67)
However, the issue the poskim raise of it being ribbis in public is not so simple, as presumably this only applies if the public knows about the loan, like a standard loan was in the times of Chazal, when it was always done in front of witnesses etc. However, most loans nowadays are done privately, and people don’t know about it. Therefore, it’s not so simple to say that it’s considered ribbis in public (see Nesivos Sholam pg. 96, ois 7).