The court ordering a sale of real estate pursuant to partition proceedings may, if it appears that the personal estate of the ancestor from whom such real estate descended is insufficient to pay his just debts, direct the real estate to be sold free and clear of the lien or claim of the debts, and make such order touching the disposition of the proceeds as may be necessary for the ascertainment and payment of the debts, or the deficiency thereof, from the proceeds prior to distribution.
N.J.S. § 2A:56-24