In the One Piece anime, there are numerous occassions where the crew runs out of critical supplies such as food, water, etc. However, Sanji never seems to run out of cigarettes. Furthermore, he is never shown to buy one in the anime.
I wish I could give you a canon answer but after a lot of searching I was not able to find one. Sanji with his cigarette was just something that was established with his character. If there was a long period of time that he went without one it just wouldn't feel right to a viewer because they are used to the cigarettes. I believe the longest period of time that he went without one was on Punk Hazard and he was in Nami's body, he obviously had some bigger distractions at hand that kept him from his addiction. I will continue searching to try and find a canon answer if I am able to I will update the answer accordingly.