Can a rabbi, congregation, or anyone in need ever knowingly accept a donation of money that was acquired illegally, for instance under extreme circumstances, when it may be very badly needed?
As a general rule, life saving trumps all concerns, so if it is a matter of life and death, of course the money can be accepted. It is even arguable that the money must be accepted if the alternative is death.
But the debt remains. If it is stolen money, the money used to save life still needs to be returned.
I notice you ask about a Rabbi. Why would a Rabbi be dfferent than anyone else? Everyone is beholden to Jewish law, Rabbi or not.
On the matter of "very badly needed," that is somewhat more complicated. Needs are usually relative, and it is easy for people to justify inappropriate actions by saying that it was as a result of a "very badly needed" circumstance.
Additionally, knowingly accepting money acquired illegally is a clear Hillul haShem, a desecration of God's Name. There is no room for such behavior.
Answered by: Rabbi Reuven Bulka