A squabble over $3.7 million in federal aid to a California irrigation district has put the Interior Department at odds with some California lawmakers and threatens to rekindle a bitter battle over western water subsidies.

Congress approved the aid last year to the Fresno-based Westlands Water District, which is under pressure to find a solution to its toxic drainage problems.

But Interior officials have refused to hand over the money, contending that the department has no authority to extend the loan under a 1966 law that Congress chose as the vehicle for the aid. The department says it needs new legislation, and it has drafted a five-sentence bill that it says will solve the problem.

The catch is that the proposed bill would create a crack through which Westlands, and potentially other beneficiaries of federal irrigation subsidies, could escape new provisions of the Reclamation Act, which governs repayment of billions of federal dollars that have gone into the watering of the West.

Reclamation law was tightened in 1982, after years of rancorous dispute over the size of water subsidies enjoyed by large western farms, especially in California. The new law limits irrigation subsidies to 960 acres. For additional leased land, farmers are supposed to pay full cost of water.

When the law is in effect, many corporations and large landowners in Westlands and other areas will have to sell off large tracts and pay much higher prices for water.

Water-users must comply with the law by spring 1987, sooner if they receive new government benefits in the meantime. Interior's proposed legislation, however, would waive that provision for the $3.7 million loan to Westlands, a move that some fear could put the reclamation law in jeopardy.

"It sets a precedent for exemptions," said an aide to Rep. George Miller (D-Calif.), who led the fight to tighten reclamation law three years ago. "The moment you open up that law, somebody is going to stand up and say 'What about me?' "

Interior officials, however, contend their bill only does directly what Congress attempted to do indirectly: exempt the loan to Westlands from reclamation law.

"We did it because that was the effect of the bill passed by Congress," said Assistant Secretary Robert N. Broadbent. "They wanted to get around reclamation law. That's why they used the 1966 law to start with."

Congressional aides concede that supporters of the Westlands loan chose an obscure 1966 contracting statute to avoid stirring up the politically divisive reclamation issue. "We were dancing on the edge of a sharp blade," said an aide to Miller, "but we were willing to forgo that fight to deal with this problem."

The problem is that Westlands drainage has seriously contaminated the nearby Kesterson National Wildlife Refuge, killing or maiming hundreds of migratory waterfowl and forcing refuge managers to conduct an elaborate "hazing" program to frighten birds away from the sanctuary.

The hazing program is not working well, and recent studies reportedly found evidence that toxic contaminants from the refuge are harming mammals as well, a potential threat to the endangered San Joaquin kit fox in the area.

Interior and Westlands officials have agreed to halt drainage this spring, in preparation for a full-scale cleanup at Kesterson. Unless farmers can find another way to treat or dispose of tainted irrigation water, however, thousands of acres of farmland will eventually become too waterlogged or contaminated to grow crops.

The loan is supposed to help find a way out of that dilemma, and it has bipartisan support in the California delegation. It also has the backing of the Environmental Defense Fund, a group that has agreed to work with Westlands on solutions to its drainage woes.

According to congressional aides, California Sens. Pete Wilson (R) and Alan Cranston (D) drafted an alternative to Interior's bill last week, carefully skirting the Reclamation Act. The proposal won approval from Miller, Westlands and environmentalists but not, apparently, from Interior Solicitor Ralph W. Tarr, who issued the legal opinion that deflected the loan.

Tarr declined to appear at a House hearing on the matter last week at which Miller accused the department of "playing games" with the Westlands loan, and he declined to return telephone calls seeking an explanation of his opinion.

"He says his [opinion] letter speaks for itself," an Interior spokesman said.