The Interior Department yesterday gave a New Mexico oil company approval to drill for natural gas in a wilderness refuge, six weeks after the firm set off an uproar among environmentalists by bulldozing and drilling in the area without a permit.

Interior officials had refused in October to issue a drilling permit to Yates Petroleum Co. of Artesia, N.M., and a federal judge last month ordered the company to abandon its well in the Salt Creek Wilderness of New Mexico's Bitter Lake Wildlife Refuge.

At the time, a congressional ban prohibited Interior from granting oil and gas leases in wilderness areas. But that ban, imposed by Congress last fall, was altered during the lame-duck session to allow energy development under certain circumstances within the federal wilderness system.

Yates fits those circumstances, Interior officials said, and the agency's Fish and Wildlife Service issued the company a permit yesterday.

The change came in a rider to Interior's 1983 budget sponsored by Sen. James A. McClure (R-Idaho), addressing the unusual land ownership pattern of the Salt Creek Wilderness and other areas in the West.

While the federal government owns the surface of the wilderness refuge, it does not have total control of the area because the state of New Mexico owns minerals beneath it. Ten years ago, state officials granted Yates a lease to explore the area, but company officials did not attempt to develop the area until earlier this year, when they applied for the necessary federal permits.

Before Interior could grant the permits, Congress passed a resolution forbidding drilling in wilderness areas.

Citing this provision, Interior officials refused in October to issue the Yates permit. But the McClure amendment changes the picture, according to an Interior solicitor's report. Under the 1983 budget, Interior can issue drilling permits to companies that had obtained mineral rights in wilderness areas before Oct. 1, 1982. Yates meets this test, officials said.

Yates officials could not be reached for comment, and it remained unclear whether the company would begin drilling immediately. A Justice Department spokesman said the firm may still be prosecuted for violating the now-defunct congressional ban.

"We haven't decided which way to jump," the spokesman said.