If no man has lain with you, and if you have not turned aside to uncleanness while you were under your husband's authority, be free from this water of bitterness that brings the curse.
Numbers 5:19 ESV

This is within the context of the trial of a woman suspected of adultery. "Turned aside to uncleanness" doesn't refer to ritual uncleanness such as would be conferred by a corpse or bodily discharge, but rather to something "off limits" or forbidden. I.e. sexual immorality.