Hi - my name is XXXXX XXXXX I'm a Real Estate
litigation attorney. Thanks for your question. I'll be glad to assist.
If the property is in foreclosure, it likely makes no difference since the mineral rights would likely be transferred with the house and surface land through the foreclosure unless there's a deed specifically excepting the mineral rights from the property's title that was pledged to the bank.
However, if there is a mineral interest separate from the house and surface, and this was not addressed in the divorce decree, the only thing you could do is file a motion to modify the divorce decree and have the judge determine who gets the mineral interest, or how to split it. The judge could divide it equally, give it to just one or something else. It just depends on what the judge considers as being the most fair/most equitable thing to do.
Thus, if you believe that the mineral rights are separate from what has been pledged to the bank as collateral, then you can file a petition with the court for a modification to your divorce decree.
Thanks for your question, and if you need anything further, please don't hesitate to ask.