A character's moral dilemma is your moral dilemma. Is it okay for this character to cheat on her husband? You know the circumstances under which it happens, so you're the only one who can answer the question.
And the question does have to be answered. If not, you'll end up writing a novel with your eyes closed, so to speak. That is, you'll write about events which you don't approve of, without disapproving of them. Isn't that dishonest in a fundamental way?
I've had to deal with this problem in thrillers, where I want a protagonist to kill a villain, but can't because the villain's true villainy hasn't been revealed yet, so the act would simply render my protagonist a murderer.
How many movies have you seen where the hero stops the villain's evil plot, then confronts him with his villainy, and while reading him the riot act, the villain falls backward off the balcony (some crappy TV movie of a V.C. Andrews thing)? Or the villain picks up a weapon to kill the hero, and touches a high-tension cable and is electrocuted?
These are the result of the story calling for the villain to be killed without making the hero a murderer.
Your situation is more subtle, but it's the same problem. It's hard to depict a character doing something morally repugnant, and expect readers to root for that character.
Possibilities: Have your character agonize over her attraction, and do her damnedest to make her marriage work, but her lump of a husband absolutely refuses to take part in her marriage-saving attempts, thus putting responsibility for the marriage's failure squarely in his lap.
For added measure, she could continue to agonize over the immorality of it all even after her husband demonstrates his lack of concern, maybe by confessing (if she's Catholic), or some such.
Everyone understands that there are sham marriages in which "fidelity" is just another motion to go through, and that people sometimes meet and fall in love through no fault or motivation of their own (if they work together, for example).
Work it out.