Addiction has long afflicted rural east Tennessee, where the rolling hills and mountains are woven with small towns suffering from poverty and poor health. Prescribing rates for opioids are still strikingly high, and the overdose death rate in Roane County, where Ms. Whitefield lives, is three times the national average. Jobs go unfilled here because, employers say, applicants often cannot pass a drug test.

Across Tennessee, some 163,000 poor adults remain uninsured after state lawmakers refused to expand Medicaid under the Affordable Care Act. For them, and even for many covered by Medicaid, as Ms. Whitefield is, evidence-based opioid addiction treatment remains meager. More common are cash-only clinics, or abstinence-based programs that bank on willpower instead of the addiction medications that have proved more effective.

Treatment for endocarditis usually involves up to six weeks of intravenous antibiotics, often in the hospital because doctors are wary of sending addicted patients home with IV lines for fear they would use them to inject illicit drugs. Many, like Ms. Whitefield, also need intricate surgery to repair or replace damaged heart valves. The cost can easily top $150,000, Dr. Pollard said.

Advice from specialty groups, like the American Association for Thoracic Surgery and the American College of Cardiology, about when to operate remains vague. For now, “it’s just a lot of anecdote — surgeons talking to each other, trying to determine when we should and when we shouldn’t,” said Dr. Carlo Martinez, who is one of Dr. Pollard’s partners and who operated on Ms. Whitefield at Methodist Medical Center of Oak Ridge.

Their practice, owned by Covenant Health, will almost always operate on someone with a first-time case of endocarditis from injecting drugs, Dr. Pollard said. But repeat infections, when the damage can be more extensive and harder to fix, make it a tougher call. Dr. Mark Browne, Covenant’s senior vice president and chief medical officer, said, “Each patient is evaluated individually and decisions regarding the appropriate course of care are determined by their attending physician.”

In the nearly two years since she got sick, Ms. Whitefield has felt physically diminished and been prone to illness. She also feels harshly judged by a medical system that saved her life but often treats her with suspicion and disdain.