The UK ANO, which is,
afaik, a legal document, has an article that states:
139 Drunkenness in aircraft
(1) A person must not enter any aircraft when drunk, or be drunk in any aircraft.
It's not a case of airline rules, or the CAA doing someone else's work. It's a legal requirement, that, quite obviously, is not enforced on a regular basis.