In Monopoly, Is it OK for a third party to make a trade with a player who is about to lose?
The usual ruling is that if you are threatened with bankruptcy (you've landed on a property and don't have enough cash), you can only make trades with other players if they will allow you to avoid bankruptcy.  If you can't avoid it, the bankrupting player gets everything you owned (cash and property) at the instant you landed on them, after selling houses/hotels to the bank.

A strict reading of the rules would indicate that if you land on a property and don't have enough cash to pay the rent, you're bankrupt immediately and have no opportunity to sell/trade (or even mortgage) stuff to raise money.  Most people consider that silly, and allow trades to raise enough cash to avoid the bankruptcy.

Another common house rule related to bankruptcy -- a player may accept LESS than the amount they are owed if they wish.  A common use: You land on my hotel on New York and owe me $1000.  I offer to let you off for a $1 if you sell me Boardwalk for $1.  Otherwise you might sell it to the player that owns Park Place for $1000 to pay your rent.  I can't just buy it from you for $1000 as I don't have that much cash on hand.