Would you do the same for a friend? Me personally I think I would have just confronted such a friend and told them to seek help instead of me altering my lifestyle for his benefit. If they didn't seek help to the point that it was affecting me I would've just stopped hanging out with them silently I think. A friend would've had to be a real good one to make an exception at least.
I don't think confronting your friend would change his addictive ways of gambling, however changing your lifestyle wouldn't neither change his addiction, even if you guys decided to quit your friend would move elsewhere to satisfy his gambling habit would you be monitoring him? No, my suggestion is that he needed some thorough counselling especially about the danger of being an addicted gambler and it consequences I believe thstvsooe action would surely change him for better, however confronting him might add more salt to the wound and further confrontation would likely ended up being recalcitrant can every result to exchange of words.