The policy applies to "safety-critical" areas, where impairment would present an obvious issue for the airline.

Air Canada announced Friday that pilots, cabin crew, flight dispatchers and aircraft maintenance workers won't be able to smoke weed whether they're on or off duty.

With recreational marijuana legalization nearly two weeks away, Canada's largest airline has barred some of its employees from consuming cannabis, even when they're off-duty.

Getty Images An Air Canada airplane takes off from Newark Liberty Airport on Sept. 30, 2018.

But for companies where public safety is not at risk from cannabis consumption, can employers still dictate what their workers do in their private lives?

Katrina Ingram is the COO of Cannabis At Work, a company that provides education and training to employers and employees about their rights around consuming medical and recreational cannabis.

She told HuffPost Canada the answer is "technically, yes," though there's a distinction between medical and recreational users.

Employers have a duty to accommodate any employees who are medical cannabis users, she said, which could involve "reorganizing aspects of their job in order to ensure that safety is taken into account."

"Recreational use is really governed by an employer's drug and alcohol policy. And that is up to the employer to set that particular policy," she said.

"So in terms of cannabis, do they have the right to do that? Technically yes."

You can't just go around randomly drug testing people.Katrina Ingram, Cannabis At Work

Ingram said she's curious to know what Air Canada's unions say about the issue, since they'd likely be treating alcohol differently from cannabis.

"I think it's interesting that they'd be treating these two substances a little bit differently, and it's probably borne out of a position of not really understanding what the implications are going to be for cannabis use," she said.

HuffPost Canada has reached out to the Air Canada Pilots Association for comment.

Police forces divided

Calgary's police force also announced last week officers will be banned from using cannabis while off duty, but Ottawa's police force voted to allow it, provided workers don't show up to work high.

"It's not illegal and in that, we didn't feel that we were in a good ground to say that we should prohibit our members from using it," Ottawa deputy police chief Steve Bell told CBC News.

"Instead we said you've got to come to work and be ready to do your job."

Watch: You could fail a drug test from second-hand smoke. Story continues below.