Like many things in the UAE it a rule, but perhaps not often enforced with any vigour. Until that is you upset someone more important or well connected than yourself. The real problem may be difficult to prosecute but sending you to jail for some cough medicine satisfies the local ego and you have no grounds to complain because you did actually break the law!