Pure Food and Drug Act did not criminalize cannabis and heroin, it merely said products containing them needed to be labeled as such. They were still available without a prescription.
I can’t imagine how any drugs like heroin or cocaine could have been sold OTC (although they were). It just seems like something that addictive that makes you feel amazing would cause problems damn well near instantly.