Depends on the period you're thinking about. Throughout most of my service smoking permitted in offices and barrack rooms.
Courses of instruction went: course, 10 min smoke break (usually round the back of the building, hats off) course, NAAFI break, course, smoke break, course, lunch etc etc. Order of dress not a factor except, as I say, hats were always off and smokers usually required to skulk somewhere out of public gaze. Out of barracks, complete no-no except in places like motorway services and other break spots. Pubs even in the earlier days when it was common to be out and about in uniform.
Later of course came no smoking in buildings and designated smoking areas invented - again for some quirky reason, hats off.
Not too long after they landed in Italy, loofkar senior and a mate left the company leaguer to look for his pipe, which had somehow bounced out of their Bren carrier when they passed earlier on. It was a quiet period. While they were searching for the pipe in the tall grass by the roadside, a jeep with two men in it drove up and came to a halt. They snapped to attention, recognizing the passenger, whom they had first met back in Egypt, as he stood on the bonnet of a jeep to address their unit, some time after the battle of Alam Halfa.
Dad thought "We're in for it now". “What unit are you from?” Monty asked them. “2nd Battalion KRRC Sir.”
“Aha. Give my regards to Major Curtis.”
Monty said something to his driver. The driver took a tin from the back of the jeep and gave it to them. It contained Players cigarettes.
loofkar senior told me this story about 30 years ago but just to make sure I have it correctly I just called him and
he repeated the story - he's a hundred and three now. He stopped smoking in the early '70's.