When a decree or order is made under this article, or under article nine, chapter twenty-seven of this code, for the sale or other conveyance of the real estate of an insane or infant or convict spouse, the other spouse may, if he or she think fit, join in the conveyance and thereby release dower and shall in such case, if he or she so demand, receive out of the proceeds of sale the value of his or her inchoate dower, computed according to the provisions of article two, chapter forty-three of this code, or such land may be sold free and clear of inchoate dower under the provisions of section five, article one, chapter forty- three of this code.