i feel for you. she needs to know but be very careful. you must think of a way to tell her that wont put you in the middle. alot of times when you are the bearer of such news you end up losing that friend. they become resentful. an annonamous note or even just to bring it up when the three of you are together somewhere. like" hey i saw you guys at whereever you saw this encounter and when she says i didnt go there you can reply with oh i'm sorry i thoght it was you with joeblow that is cheating on her this kind of gives you an out per say you know 'oppps my bad. good luck.
In my opinion, you should tell your friend that the boyfriend is cheating. However, be ready to be persecuted, because no woman loves the person who conveys such news. But, with time she will get over it and you will continue being friends.