One expert, Louisa Degenhardt, a professor at the National Drug and Alcohol Research Center at the University of New South Wales, Sydney, said she was concerned that the naltrexone treatments severely lower drug users’ opioid tolerance. “If they return to use, they will be at risk of overdose,” she said.

Researchers are still investigating how long-acting naltrexone holds up against traditional treatments, though there is evidence that it has advantages over the daily tablet. One study found that both naltrexone injections and buprenorphine were equally safe and effective, though many of the participants assigned to naltrexone never started it because they could not tolerate withdrawing from opioids first.

Studies of Dr. O’Neil’s implant — some funded by his clinic — have found that patients who used his device had a lower rate of opioid overdose compared with those who took the oral tablet, and that the implant may have some benefits over methadone.

In a darkened clinic room last month, Jessica Martin, 25, closed her eyes as Dr. O’Neil made an incision and screwed a finger-size tube of naltrexone tablets into her numbed stomach. Over his shoulder, a plastic surgeon visiting from Columbia University watched. Ms. Martin’s boyfriend kissed her forehead — soon it would be his turn.

A ward of the state who had lived on the streets, Ms. Martin said she had become addicted to heroin four years ago after using it to manage pain in her wisdom teeth. Among other things, she said she wanted to get her driver’s license.

“I feel better now coming here,” she said. “I feel confident that I’ll stop it.”