One cannot borrow from or financially transact with someone whose wealth is completely, or predominantly, haram.
If it is predominantly halal, then financial transaction, borrowing, accepting gifts, etc. would be permissible.
If one is unsure, then the default assumption is that most of their wealth is lawful, unless one is reasonably sure otherwise. One need not investigate into their wealth, but rather the basis is what is apparent.
[Ibn Abidin, Radd al-Muhtar; Fatawa Hindiyya]