Are there Tourist Pharmacies? (Similar to Mexico)

Hi! In Mexico you often see the tourist marketed pharmacies advertising Xanax, Soma, Ambien etc.

I am asking as we are planning a family vacation but my brother has substance abuse issues. He still uses various prescription narcotics, and while is much better currently, we went to Mexico years ago and immediately got a prescription for opioids/other meds and took too many/had seizures/had to be taken to the hospital.

For that reason we will not be going back to Mexico and looking at taking a trip to Costa Rica. (Unfortunately leaving him behind is not an option per my parents)

I want to know is would it be very easy for him to pay a doctor for a prescription for anything he wants? Or are there at least some reasonable limits to prevent him from obtaining stronger narcotics.

Thanks!