That is a very confused question!
If what you are asking is - is it possible for a married couple to reach agreement between themselves as to how they wish to regulate matters? is it possible to ask the Court to make that an order by consent? is it possible to enforce any such agreement? Court order?
What you cannot do is relieve one person of their obligations under the mortgage unless the lender agrees.
The answer to each is Yes. But wherever there is any degree of future uncertainty, it is impossible to advise as to how people may subsequently change their minds, disremember, disappear , whatever.
You should talk to your solicitors.
mf