In all cases of sales when it appears that any person has a vested or contingent or future right or estate in any of the property sold, the court must ascertain and settle the proportional value of such contingent or vested right or estate and must direct such proportion of the proceeds of the sale to be invested, secured, or paid over, in such manner as to protect the rights and interests of the parties.
§ 70-29-325, MCA