Back in the day, I used to tell friends who were doing this (either as OW/OM or as the married one; sometimes both) that I didn't like what they were doing and so would appreciate not hearing about it - and refused to lie for them or engage in any cover-stories.
But a few years ago - and before my own H had an affair - I stopped doing this, because it occurred to me that if the friend was selfish enough to land me with the burden of knowledge, I deserved to give them my true opinion.
Since then, I have (with their approval) asked lots of difficult questions and got them to really think about what they are doing. Asked them what it about them as a person for them to have chosen this route - and urged them to go to a counsellor to process their feelings.
I have also made it clear that although I will always love them, I hate what they are doing and that it would be dishonest to say I didn't judge them, because I did.
In recent times, I have managed to help a friend stop being the OW and to humanise the wife she was colluding to hurt. Now that the relationship is over, this friend is horrified that she behaved so badly and has thanked me for waking her up to some realiities.
So in your shoes I wouldn't take a passive role. If your friend has told you this, you cannot "un-know" it. It might be helpful to her if you direct her to this board actually to read the stories about affairs and get some realism about the tremendous harm they do, not just to the people betrayed, but to the people causing the pain too.
For a basically decent, good person, having an affair and all the deceit and lies entailed is contrary to their values and character. Many people in this situation emerge being terribly damaged, because their behaviour has been so dissonant from what they regard to be their true selves.
I imagine that your friend is using lots of justifications for her behaviour and also lots of disassociation from the decisions she is making - I bet you're hearing stuff like "I got swept away", "I never thought this would happen to me" and "I wouldn't be doing this if I were happy". Remind your friend that she is an adult who makes choices.
There is an additional complication which I think particularly affects women. Because unfortunately it is still ingrained in many women that they must love the man they are sleeping with, it can lead to all sorts of ridiculous notions that the affair partner is their "soul mate" and that their marriage must be doomed if they are doing this. In reality, many women have affairs because they quite fancy sex with someone else, so urge your friend to get some perspective here and see this for what it really is.
Urge her to take responsibility for what she is doing and to accurately project the consequences.
A really good friend will tell us when we are behaving badly and the friendship doesn't suffer in consequence, but only you can know how much your friendship will withstand.