The Senate approved an amendment yesterday that would freeze all spending by the District unless the D.C. Council agrees by Dec. 31 to overturn a law prohibiting insurance companies from denying coverage to persons who test positive for exposure to the AIDS virus.

Similar attempts by conservatives to kill the controversial legislation failed in Congress last year. But D.C. Council member John Ray (D-At Large), the author of the insurance legislation, said he fears opponents may succeed this year because of intense lobbying and campaign contributions by the insurance industry and growing hostility toward the District.

"All things being equal, I would say the amendment would be knocked out in {a House-Senate} conference," Ray said, referring to the final legislative step in which congressional leaders will attempt to reconcile House and Senate versions of the $3.9 billion D.C. Budget Bill. "But all things are not equal. I was surprised by the Senate action and I wouldn't be surprised if it made it through conference."

However, Mayor Marion Barry and gay rights activists who backed the legislation voiced confidence that the measure, introduced as a rider to the 1988 D.C. appropriations bill by Sen. Jesse Helms (R-N.C.), would not survive.

"We're hopeful we can knock it out in conference," Barry said.

The 1986 law, considered the most liberal of its kind in the country, has been the target of an intense lobbying effort by the Moral Majority and other antihomosexual groups.

Critics charge that the law has resulted in an insurance crisis in the city because most major insurance companies have stopped writing new life and health policies for individuals.

"The residents of the District of Columbia are paying a high price for the weakness and stupidity of the members of the D.C. Council," Helms said.

In approving the District's $3.9 billion capital and operating budget for the fiscal year that begins Oct. 1, the Senate also:Voted 60 to 39 to reject an amendment introduced by Sen. Don Nickles (R-Okla.) to prevent the District from using its own funds, as well as federal funds, to pay for abortions for the poor except to save the life of the mother.

The Senate instead adopted what has become standard antiabortion language in federal appropriations bills, barring the use only of federal funds for abortions, except to save the mother's life or in cases of rape or incest.

The House earlier approved the more restrictive language, but the Senate is expected to prevail in conference. Approved a federal payment to the District totaling $434.5 million -- $10 million less than recommended by the Senate Appropriations Committee but a bit more than the $425 million approved by the House.

The committee had proposed the additional $10 million to compensate the District for water and sewer services. Expressed concern about recent media reports about federal investigations into possible corruption in the D.C. government, but struck language from the bill, inserted by the House, that found "deplorable" the apparent pattern of corruption.

"Corrupt behavior . . . is abhorrent and should not be tolerated," the Senate said in a report accompanying the bill.

" . . . It serves no purpose to single out the D.C. government other than to give the false impression that the vast majority of D.C. government employes are not hard-working dedicated public servants, which they are."

Barry hailed the Senate's action, notwithstanding the approval of the insurance law amendment, arguing that it "demonstrates a renewed confidence in our ability to manage the city."

"Our budget was basically left intact by the Senate," he said.

During the debate over the abortion amendment, however, Helms took at shot at Barry, questioning his competence in the face of a series of federal probes of his administration.

"If I read the newspapers correctly, maybe somebody ought to run the city because Mr. Barry is having problems in terms of personal and official conduct," Helms said. "But I won't get into that."

During yesterday's debate, Sen. John Warner (R-Va.) took the floor to declare there is no chance the federal government would provide funds or intervene to help build a new Washington Redskins football stadium in the District.

Warner apparently was responding to reports that he had told Redskins owner Jack Kent Cooke that he would research the possibility of federal financing for a 75,000-seat domed arena to replace the Robert F. Kennedy Stadium, which seats 55,000.

Citing the federal government's own budget problems, Warner said, "We have an obligation to put aside any hopes the federal government could be forthcoming with matching funds for a new stadium."

The insurance law under attack in the Senate, which survived a challenge by the insurance industry in federal court late last year, does not extend its protection to persons who have AIDS.

Rather, it is designed to prevent discrimination against persons who test positive for exposure to the virus associated with acquired immune deficiency syndrome, and prohibits companies from having persons tested or from charging higher rates on the basis of a positive test, for five years.

Jeffrey Levi, executive director of the National Gay and Lesbian Task Force, said yesterday that city officials, gay activists and the insurance industry have met to discuss possible modifications to the law to stem the flight of insurance companies from the district.

"I think the Senate's action is an unwarranted intrusion in District affairs," he said.