This is a big improvement from the days when treatment typically was offered through scattered, poorly funded stand-alone clinics that did not necessarily provide evidence-based treatment and had long waiting lists, said Richard Frank, a professor of health economics at Harvard Medical School.

“The whole system is being pushed more toward looking like modern health care,” said Dr. Frank, who worked at the Department of Health and Human Services in the Obama administration.

The 21st Century Cures Act, which Congress passed in December with strong bipartisan support, could build on the progress by providing $1 billion nationwide over the next two years to expand drug treatment around the country, with an emphasis on medication-assisted treatment. The federal government will soon begin distributing the money to states, which will allot it to treatment programs, particularly in high-need areas. But if people lose their insurance, Dr. Frank said, they may well lose access to these new options.

In Kentucky about 11,000 people were receiving addiction treatment through Medicaid by mid-2016, up sharply from 1,500 people in early 2014, according to the Foundation for a Healthy Kentucky, a health policy research group. In West Virginia, Ms. Rosenberg of the National Council for Behavioral Health said, her group’s member organizations — nonprofit providers of mental health and addiction treatment — are now treating 30,000 people a year, up from 9,000 before the health law.

Here in New Hampshire — which Mr. Trump won resoundingly in the Republican primary and lost by a hair in November — more than 10,000 people have received addiction treatment after gaining coverage through the Medicaid expansion, said Michele Merritt, senior vice president and policy director at New Futures, a nonprofit advocacy group. Small treatment centers throughout the state that had never been able to bill insurance before have started doing so, she said, allowing them to hire more counselors and accept more patients.

“We’re just beginning to implement these exchanges in a way that people know about them,” said Senator Jeanne Shaheen, a New Hampshire Democrat, referring to the exchanges created under the health law. Getting rid of them, she said, “makes no sense.”