Residents in 14 states and Washington can now appeal to their doctors for prescriptions for medical marijuana to help them with their pain.
Their employers, however, may not be so understanding.
In some cases, workers have been fired for failing drug tests despite having prescriptions saying, in effect, that what they are doing is legal according to the laws of their states.
Though the number of such cases appears to be small, they are exposing a new legal gray area, with workers complaining of rights violations and company officials scratching their heads over how to enforce a uniform policy for a drug that the federal government has not recognized as having a legitimate medical purpose.
"The current state of affairs puts employers in a very difficult situation," said Barbara L. Johnson, an employment lawyer in Washington. "But the reality is that there are no federal guidelines like there are when dealing with other types of prescription medications."
Some workers have learned about this legal quandary first-hand, at the cost of their jobs.
Nick Stennet, 20, has a congenital disorder called Poland's syndrome, which left him without a chest muscle on the right side of his body and with a right hand with fingers substantially shorter than those on his left.
Doctors prescribed one or two inhalations of marijuana each night before bed to relieve severe muscle stiffness and shooting pains in his arms.
Mr. Stennet said he told the human resources manager at the Home Depot in Hilo, Hawaii, about his prescription when he was being hired. But after his drug test came back positive for tetrahydrocannabinol, or THC, the active chemical in marijuana, he was out a job.
"Why would they send me down there when they know I am going to test positive?" he said. "I feel like they put me through ridicule when it was so avoidable."
Steve Holmes, a Home Depot spokesman, said the company followed federal guidelines for its drug policy. Employees are allowed to take a leave if they choose to use marijuana to combat the side effects of treatment for a serious ailment. When they return, however, the THC must be out of their systems.
"It's a safety issue for us," Mr. Holmes said.
Cynthia Estlund, a professor of labor and employment law at New York University, said that only one state that had legalized medical marijuana had taken the additional step of saying explicitly that it was unlawful to fire someone for using a lawful substance.
At the same time, Ms. Estlund said, "Nothing in the law tells employers what to do, so they don't have to fire them under federal law."
That is the objection raised by Scott Michelman, a lawyer for the American Civil Liberties Union, on behalf of his client, Joseph Casias.
In 2008, Mr. Casias, a father of two who medicates with marijuana to relieve the pain of inoperable brain and sinus cancer, was named associate of the year at the Wal-Mart in Battle Creek, Mich. But when he injured his knee last year, company policy required a drug test. The positive result cost him his job.
In June, the A.C.L.U. filed a complaint in state court on his behalf, citing wrongful termination. He is seeking reinstatement and damages.
"The cancer is not what's keeping him from earning a living — Wal-Mart is," Mr. Michelman said. "There's actually no law to require Wal-Mart to do what they did."
Greg Rossiter, a spokesman for Wal-Mart, said: "This is obviously an unfortunate situation all around. But we have to consider the overall safety of our customers and our associates."
On the broader legal question, Mr. Rossiter added: "As more states allow this treatment, employers are left without guidelines."