When a party entitled to a share of the property, or an encumbrancer entitled to have that encumbrancer's lien paid out of the sale, becomes a purchaser, the referees may take their receipt for so much of the proceeds of the sale as belongs to them.
N.D.C.C. § 32-16-35