Yes, the IRS will apply any refund for this year to your unpaid balance from a prior year.
The good news is that will reduce the amount that you owe.
This may not be what you would have liked to hear; but at least now you know.
If possible you could reduce withholding or other payments to the IRS during the year to let you use the money rather that being part of a refund that is kept by them.
Please ask if you need clarification.
There is a situation in which, perhaps, the refund would not be kept (which another expert commented to me about).
If it was not a joint return in the year for which the amount is past due; but that unpaid tax is only for your spouse's unpaid tax then you may be able to avoid having your paid in tax for this year being applied to your spouse's past due tax by using Form 8379 and the IRS will determine the Injured Spouse Allocation.
I hope this helps.