Absolutely!!
Sheesh - no wonder so many women complain about finding the “perfect man”. With standards that high it’s a wonder anyone can find a husband!!
Going simply by the OP - assuming this is a one time thing and he thought it important enough to “confess”, then it sounds like he’s a good guy to me. He didn’t keep it to himself, he didn’t continue the practice.
Men are not perfect, they can’t just turn off their ability to be attracted to women, but they can control it. To think that, based on only what we know in the OP, that he would be kicked to the curb is just absurd…and so very sad.
As if in a marriage something like this would NEVER happen!!!

That is a totally unrealistic idea of life and if that is the case, perhaps this couple is not ready for marriage.
~Liza