Hey, Kev', all you can do is be there for your friend--which you are, apparently, ready to do--while at the same time letting him know that, based on your previous observations, you feel that this is leading him into making a mistake concerning his ex-b/f. Unless the ex-b/f has gone through detox and rehab of some sort, there hasn't been any change, and ex-b/f just wants your friend back as a rebound-boy because he can't detect when ex-b/f's using which let's ex-b/f be more relaxed when ex-b/f is using.
I know that sounds terrible, grammatically, but it's the same thing everyone's telling you--you be there for your friend, not for his ex-'--if you all go out together, you can be civil even if you don't like his ex-', just don't get aggressive if you can possibly help yourself.
Good luck to you in your support for your friend.