For many substances we consider "obviously" illegal now, yes. Most famously, Coca-Cola used to use cocaine instead of the caffeine it currently has. Even for the "prescription-only" enforcement level, this used to be the purview of the FDA and the people subject to enforcement were the ones operating pharmacies, not their customers, or people who got stuff through side channels. Maybe cops still used the excuse of drug intoxication to deal with people more harshly, but they couldn't stop and search someone merely on the suspicion that they had contraband
Drug enforcement should work like industry regulation and consumer protections, not operate on individuals as criminal penalties