You say he isn't treated well by her. You also question where the line to cross over to cheating might be.
I have seen relationships where I perceived mistreatment but it was by my standards and not theirs. The relationship was fine by their standards.
So does he put in the work (and do you see this for yourself) to communicate his wants in regard to his marriage, the poor treatment you see him getting, or how he wants his relationship with you to become to his wife?
Or do you two just nibshit about stuff with each other when she isn't around?
One set of circumstance shows he too wants AND IS SEEKING a change in his relationships with you both and the treatment he receives. The other shows the make up of an affair. Such as how someone could claim their marriage is awful due to XYZ to their non spousal partner while having no intention for the marriage to change because they don't really feel about it the way they portrayed it to their other partner.
Ask yourself if you want their relationship to get better and thrive or if you want her (the perceived obstacle) to be gone thus ending your frustrations?