It would appear that drinking alcohol on duty is frowned upon, both before and after the invention of synthehol. The only times it's tolerated are with the permission of the Captain or a senior officer.
KOR: Come and join us, my friend.
EZRI: I am on duty. I'll see you later. It's good to see you again, Kor.
DS9: Once More Unto the Breach
KEENE: Just a little stiff. Thank your doctor for me. I've got some Drilaxian whisky stashed away, if you'd like to join me.
ARCHER: I'm on duty.
ENT: Fortunate Son
REED AND ARCHER: Hear, hear. [clinking beer glasses]
ARCHER: Don't get too used to drinking on duty. But you did your jobs pretty damn well yesterday. I'd say that deserves a little
ENT: Silent Enemy
TUCKER: Well, then how about a drink?
REED: I don't drink on duty.
TUCKER: Are you serious? We're dead men, remember? What's the matter, Lieutenant? Are you afraid the autopsy will show your
blood-alcohol level was too high to pilot a shuttle? Live a little.
That's an order.
ENT: Shuttlepod One
Moving down the canon scale, in the TNG Novel Diplomatic Implausibility we get the following snippet from Worf's perspective. It would appear that synthehol can be drunk while on duty.
Even better, it wasn't a syntheholic drink. While humans — who had
spent millennia cooking all the flavor out of their food — did not have
sufficiently discerning taste buds to distinguish alcohol from
synthehol, Klingons could. While Worf would drink synthehol if he had
to, while on-duty, for example — he greatly preferred the real thing, and
this was definitely it. A few more sips, he thought, and I might even
be able to stand this music
and from Star Trek: Myriad Universes - Echoes and Refractions (noting, of course that this is a "what-if" type story).
To the replicator, Haden said, “Computer, two drinks, alcoholic. A
glass of Merlot and a shot of Bushmills 21.”
Picard raised an eyebrow. “Alcoholic?” Starfleet regulations
stipulated that officers could drink only syntheholic liquor while on