1. bank's refusal is illegal
2. the agreement is registered in your name
3. you are thus the sole owner
4. also you can show the bank that all the moneys were transferred to the joint account from your personal account all the EMIs were paid exclusively by you
5. the bank can simply issue a public notice informing that upon full repayment of its dues, it is releasing the original document to you
6. further the ex-wife was made a co-applicant only on the insistence of the wife. So she can at best be taken a guarantor, when she has not contributed any penny towards loan repayment. Upon loan closure her NOC is not at all needed.
7. please take this up with the Banking Ombudsman and RBI and follow up with a RTI Application