Prescription drugs are

legal depending on how they are obtained.
always legal.
legal depending on how they are used.
legal only if used in an institution.

It is complicated: Prescription drugs to be legal, must a) be a legal prescription where it was prescribed, b) legal to use in the locale it is to be used, c) legally manufactured and obtained (you can't steal it), and used legally.

Your grandma in Mississippi can't prescribe a pint of whisky for your babies cough, nor can you give it to the baby anywhere, nor can you brew your own whisky, nor can you steal it from the liquor store.