HUD loan/refinance

I have a martial agreement stating i am to release my ex spouse from liability or refinance by a certain date. I had a modification done so there’s a partial claim that has to be paid off with the refinance. Can i still buy out my X? My home does have equity but i know there are strict guidelines with having a partial claim and i believe no cash can be taken but what about the left over equity?