Interesting point. If someone is taking prescription vicodin (which has been know to make one woozy) would the company be within their rights not to hire of fire that person? I would say yes, but I bet there would be lawsuits about that too.
They don’t have to hire, but they cannot fire unless the person did not disclose the medication. I know because I have seen it happen. When the employee reports the medication, they are put on medical leave until they are clear of the medication and sometimes are required to have a drug test to make verify.