I'm no expert, but I guess medicines have more than one ingredient. If you were seriously trying to avoid illegal substances, you would check everything.
The only excuse an athlete could have, IMO, is that their food/drink was laced. Even then, you could take reasonable steps to avoid this.
A professional athlete will have a list of allowed medication, whether it be over the counter or prescribed.
I'll hazard a guess all prescribed medicine goes through the team doctor first. (not literally)
The same applies to supplements and energy products like gels.
The days of buying a Vic's nasal spray in Canada and getting popped because the ingredients are different, are a long time ago.