cut
Good day. I suppose the environment plays a crucial role in the formation of any kind of addiction. While being in the company of drug addicts or alcoholics for a long time, a person is much more likely to acquire addiction too. Thus, answering your question, yes, it seems to me that an environment where the surrounding people are not involved in gambling will have an extremely positive effect on a person addicted to gambling.
However, there is also the human factor - the personality itself. The recovery process largely depends on willpower and the desire to change your life. Alas, if a person does not want to change anything, no environment will help.
This is very true, even if a person changes his environment a thousand times, he will not be able to change if there is really no great intention that arises from within his heart. Intention to change is what is needed for an addict to be able to leave the things that make him/her addicted, and great support from family plays a more important role for a person to recover from his addiction than changing the environment.