I would guess if you were working at the time, probably so, if you were called in to take it, probably not.
However, if they have documentation that you failed a drug test, they can pass that along to future employers because it would be a true statement that they can prove. Some background investigations even include a history of whether or not you passed drug tests for future employers.
I am sorry that this has happened to you, but it's a good example of why you must stay always clean and never take a chance on it...you never know when they may ask you to take one.
Unfortunately, taking a scheduled medicine (pain med?) for which you have no script is a very serious situation and may very well be sent to the MBON. If it is, make sure you have legal representation to safeguard your rights in any hearing or investigation process.
The only other advice I could give is if you don't have the script, then don't take the med. You are playing with fire otherwise. The incident could be very innocent, I assume that it is, but from the BON perspective they will not know or assume what I assume.
Not trying to scare you, but an incident such as this "could" lead to licensure problems, including restrictions or even worse. You put "sweat, blood, and tears" to obtain that license. You have to protect it.
Good luck and I hope it does not turn out as serious as I have opined.