State-run hospitals are free of cost, except in special cases where expensive medications need to be administered. Foreigners are welcome at public hospitals, but usually must pay for medicine.
Private hospitals do not provide free treatment but are especially well-equipped and modern, offering all specialisations and better, neater premises. Emergency care and ambulances would be available here.
For a list of hospitals, look up:
Lankainformation.lk/directory/health/hospitals
and www.health.gov.lk/moh_final/english/hospital_government.php
Most medications required for common ailments are available over the counter and without prescription. In fact, many more pharmaceuticals are available than in many Western countries. Medication is also free to locals, and expensive for foreigners.
Listing of pharmacies in Sri Lanka: https://lankainformation.lk/directory/health/pharmacies/list-alpha/c