When a gambler tells you he's borrowing money to gamble, he's implicitly warning you that if he loses, repaying the loan might be difficult, and you could end up sharing the loss. As someone with my mindset, I should be cautious and well-informed in such situations.
As long as you don't lend money to someone to gamble, you don't have to be afraid when someone else invites you to gamble with that kind of money. Because the person who has to return the money is the borrower, not you unless you have made a promise to return the money together when you lose at gambling. But if you are only invited and are not told about it by the person who invited you, I think you are free from anything so you don't have to bear paying the money.
Gambling with borrowed dun is totally a mess and if I get invited to gamble with borrowed funds, I most likely wouldn't accept and the reason is simply because, I know that I may not be gambling with my mind completely in the best form having that consciousness that I'm supposed to the funds is such that is supposed to be replaced and not to just allow get exhausted totally but then some others may have their way around, it's still never an ideal one for me and I will never want to get involved with such at any point.