While that's not a formal requirement by law or regulation, I recommend that you do so.
If you break the bad news first, then you're more in control of the situation. If nothing happens, then you still look mature, forthright, and honorable by voluntarily disclosing an awkward situation. If it does escalate somehow, your commander won't freak out and presume the worst, because you've already briefed him on the topic. You don't appear to be hiding anything, and thus he's willing to give you the benefit of the doubt. Act like a man of honor, and not a lawyer.
Bad news gets worse with age, so get out in front of the story. As difficult as it is, it's potentially far, far worse to wait.