Sure, but op is talking about someone who uses controlled substances outside of work. If they’re not under the influence of a substance at work, then it’s not the same situation you are talking about.
Airline pilots, I believe, have a no-drink-within-X-hours rule. I'm not sure whether X is 12, 24, or more. So even one drink the night before a morning flight would be prohibited, even though logically a single drink with dinner the night before should be a non-issue.
Did you know eating a poppyseed bagel will cause a positive for heroin for upto 60 hours afterwards while doing a small amount of heroin will not show up on that same test.