All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
Settling a dead person's debts should be given priority over the right of heirs.
Allah Says (what means): {… after the payment of legacies he may have bequeathed or debts. … .} [Quran 4: 11]
So, if it is confirmed that the dead is indebted; i.e., not for the sake of disinheritance of a wife, or any of the heirs, then this debt should be settled before distributing any part of inheritance.
The above-stated opinion is based on the fact that the wealth left by the dead is his own possession although it is in a bank account in the name of his wife.
Allah knows best.