As long as it is not an act of moral turpitude, you are good. However, you need to furnish a detailed draft of what transpired, underscoring the fact that it was merely an accident and was not deliberately done to Canadian/US immigration . I accidentally bought a six pack of beer to some college students in my first year in United States, I had no idea it was a sting operation. I was arrested and was incarcerated for two hours before I bailed myself out. I had to narrate the entire incident while filing my I-485. There was no trouble with my green card proceedings despite that incident, so you should be fine. Just have your employer support the statement you make. I had a friend who underwent similar incident in Denver in 1999, he actually (accidentally) sold a six pack of beer and two packs of Marlboro to a 17 year old kid, he was arrested instantly, but then, later, he had no issue getting his green card either.
Things are extremely serious if it is about sale/purchase of marijuana or soliciting prostitution.
Hope this helps.