The fact that only 15% of Sri Lanka’s population lives in urban areas doesn’t change the situation that rural hospitals and clinics might not be prepared for serious or rare issues. In fact, sometimes essential medicines might not be available so a transfer to Colombo or another major city becomes necessary. Truth be told not every medicine is available in every hospital (and we are not talking about very unusual ones). However, in general, doctors and hospitals have a good reputation. Unfortunately the chance of better salaries draw many of them out of the country.
Since the health sector was a mostly public issue for a long time high cost technologies couldn’t be afforded. Although the system is efficient and has relatively good outcomes with low costs, buying up to date technology remains in the private sector. You should make clear that you have the right insurance so in case of an emergency you can afford to go to a private hospital with higher standards. Doctors there often expect you to pay the bill first, even though you have a covering insurance. Some might want to see your credit card to prove your credibility.
Some really serious issues might even make a transfer to another country necessary. This will very likely be Thailand or Singapore since their standards tend to be higher. An insurance with medical evacuation is crucial here since the costs can easily exceed US$100,000.
Essential medicine can be purchased comparatively cheaply in pharmacies. Of course this indicates that they are available which is not always the case. Pharmacies are not equally spread and their staff sometimes isn’t fully trained. So be clear about what you need and buy some basic medicines in advance. Especially if you are travelling around in rural areas.
The US Embassy in Sri Lanka has a useful list of doctors and dentists. Of course the list is not complete but still it may help a lot.