I think in most of these cases where there is smoke there is fire.
And I disagree it does matter the gender of a close friend if your W is heterosexual.
ANS let me ask you back to my earlier diatribe on doormatism:
Does this relationship your W is having make you feel ok?
I think you are right to be concerned about what your children think. Is this the example you want to set for them?
Have you read the resources on boundaries?
I can post what I saved back when I needed them if necessary.
They are to protect you from bad choices your partner is making. And they have to have consequences for breaking them.
Give some thought to what you value in a relationship and how you would like to be treated. More importantly how you would treat someone if the roles were switched.
Would you carry on a relationship like this with a woman that excluded your W? Would YOU consider it acceptable?
Time for some thinking ANS.
My goal is to some day be the person my dog thinks I am