Smoking ‘legalized’ marijuana can still get you fired

FORTUNE — Statutes passed last November in Colorado and Washington state seem straightforward enough: Anyone over 21 can possess up to an ounce of marijuana without facing any penalty. Simple, right? Unfortunately, not for employers, nor for weed aficionados who mistakenly think their jobs are safe.

Now that 18 states and the District of Columbia have legalized pot (and at least seven more are considering doing so), in most places for medical use only, a patchwork of different state laws clash with federal drug laws and raise questions about how to comply with other federal statutes like the Americans with Disabilities Act. One issue out of the many now giving employers a big headache: How do you maintain a drug-free workplace in a state where workers have the legal right to use a recreational drug in their spare time?

The question might be moot if THC, the active ingredient in cannabis, metabolized as fast as, say, alcohol does. “Someone who had a few drinks over the weekend can probably still pass a random drug test on Monday morning,” notes Danielle Urban, a partner in the Denver office of employment law firm Fisher & Phillips. “But THC can stay in the bloodstream for up to six weeks.” So even an occasional toke can cost a worker his or her job — even in a state like Colorado that has a “lawful activity” statute designed to protect employees from being fired for off-the-job activity.

MORE: The big business of Marijuana, Inc.

The case of Coats v. Dish Network, closely watched by lawyers all over the U.S., illustrates this conundrum. Paralyzed in a car crash while still in his teens, Dish Network (DISH) phone operator Brandon Coats had been a legal medical-marijuana user since 2009. Nonetheless, Dish Network, which has a zero-tolerance drug policy, fired him in 2010 after he flunked a random drug test, even though the company acknowledged that he was never “impaired” while at work.

Coats sued Dish, and he lost. The Colorado Court of Appeals ruled in late April that because the federal Controlled Substances Act still prohibits marijuana use, Colorado’s “lawful activity” statute didn’t apply. The decision echoed that of a Michigan judge in another case last fall, Casias v. Wal-Mart Stores, Inc., where Wal-Mart (WMT) had fired an employee who legally used medical marijuana to treat pain from an inoperable brain tumor. In the resulting lawsuit, Wal-Mart prevailed.

With the courts on their side (so far, anyway), you’d think employers would be relieved but, actually, not so much. For one thing, confusion reigns over how legalized medical marijuana squares with the Americans with Disabilities Act, which requires employers to make “reasonable accommodation” for employees’ medical problems. Then there’s the Family Medical Leave Act, which some observers have interpreted to mean that companies have to give people time off if they’re being treated by a physician with any substance that would cause them to fail a mandatory drug test.

Not complicated enough yet? Throw in states like Arizona, which has passed a law that says people who do not hold “safety sensitive” jobs (an airline pilot, for instance) are safeguarded from being fired for using medical marijuana. Then consider that federal contractors, transportation companies, and some other employers are required by federal law to enforce a zero-tolerance drug policy, no matter which states they operate in. Even companies in other industries that choose to adopt more lenient policies (or none at all) can run afoul of federal OSHA workplace-safety rules.

Add to all that some employers’ own ambivalence about pot. “At a lot of companies where there isn’t a real public-safety issue, they just don’t do drug testing at all, because they don’t want to know, and they don’t want to have to fire people over [marijuana],” notes Urban. “I’ve had clients say to me, ‘If I got rid of everyone who works for me who smokes weed now and then, I’d have nobody left.’”

A few weeks ago, in an effort to clear up at least some of the legal fog, Rep. Dana Rohrabacher, a Republican from California, introduced H.R. 1523, dubbed the Respect State Marijuana Laws Act of 2013. The bill would amend the federal Controlled Substances Act to exempt medical users from penalties in states where medical use is legal. It has bipartisan support on Capitol Hill — it’s backed by two other Republicans, besides its author, and three Democrats — but, according to a nonprofit research and advocacy group called the Marijuana Policy Project, the measure is “unlikely to pass this year.”

MORE: Yes we cannabis

In the meantime, Urban has a few words of advice for beleaguered employers and the people who work for them. “First, it is essential that companies make very clear what their drug policies are,” she says. “If you’re going to have a zero-tolerance policy, and you’re going to do random drug testing and terminate anyone who doesn’t pass — even if they’re using marijuana for medical reasons — you have to make sure all of your employees know that up front. Don’t wait until someone flunks a drug test and gets fired.”

At the same time, Urban urges employees to know what their employers’ policies are. “If they don’t tell you, go and ask,” she suggests. “If your job is in a zero-tolerance workplace and you’re using medical marijuana, have a discussion with someone in HR about it.” As the law stands now, if there really is no effective treatment besides pot for your medical condition, “you and your employer may have to part ways.”

Urban also suggests that everyone study up on exactly what their states’ marijuana laws actually say. The air on the sidewalk outside her office building in downtown Denver is thick with smoke from substances other than tobacco, she observes, but “even in Colorado, it’s not legal to smoke grass in public. You can still be prosecuted. People don’t understand the law. They hear, ‘It’s legal,’ and they go crazy.”

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.