I think the consensus in the grown-up business world is "fire immediately for cause." I would bet substantial money that when you lawyer lawyer lawyer they will advise you to do that and document the heck out of it. The calculus is really, really simple: if you don't, then you will with probability approaching one get this incident or a similar incident cited during a threatened employment practices lawsuit, and your lawyers will sigh and say "OK, settle for $250,000. You can choose to fight it but the odds are not in your favor."
I get that you feel this may cause problems for your innocent employee. If it helps you contextualize this, maybe think of it less in terms of "Our departing employee has transgressed against our innocent employee, who let me into her confidence about that" and more in terms of "Our departing employee demonstrated judgement flagrantly incompatible with professional employment."
Would you be worried about this if he had been embezzling? "I'm just telling you on an FYI basis boss but I don't want to cause social issues." That's not really how we deal with embezzlement, right. You embezzle, you get fired. Immediately. The embezzlement is not a crime against the person who discovers the embezzlement. They're welcome to an opinion on what the best course of action is, but regardless of what that opinion is, the course of action will be a swift firing.
As to messaging to the rest of the company, again lawyer lawyer lawyer, but "X made comments of a sexual nature to another employee. As a consequence, we fired him. If you have questions or concerns, speak to me later. Moving on."