No, making gambling illegal will not solve addiction problem. People can still search for underground casino to continue playing gambling so that will not stop them. You can see what happen to country that ban gambling, their people can still playing gambling in a hidden casino.
But if the government allow gambling, they can get more income from gambling industry and they can use strict rules to people who want to gambling. They will not tolerate under age playing gambling and to enter to casino, people must fill many documents.