No, usually that is not permitted. Jobs for which this is permitted are laid down in law. They include pilots, skippers or railway engineers.
Read more: Checking for use of alcohol, drugs or medicines