Assuming you want to do the right thing? Unless you have a monumental trust toward the guy - and this is just the best thing for yourself - I would call things off between you and him in all regards to relationships. If you don't want to be with somebody who may easily develop attractions and relationships aside from the main one - as is evident here, you shouldn't pursue him at all if you don't want yourself to get hurt like that.
Imagine how his girlfriend might feel to hear that as it turns out, her boyfriend is fooling around with some guy? Now imagine yourself in similar shoes later down the road when you discover that he hasn't exactly been faithful toward you either. Lots of pain, emotion, and drama come crashing right into your life where you really wish it hadn't.
Honestly, for everyone's health, disassociate yourself with him. You are probably less likely to get hurt that way. He and his girlfriend can be as honest and as dishonest toward eachother as they decide to be, but for your health, don't let it happen toward you because of him, and to be morally sound, don't do it to somebody else.
Also with an issue this big I'm not so sure you should ask a place like the BL forums.