The Reagan administration asked the Supreme Court yesterday to uphold so-called "Baby Doe" rules that would give federal investigators power to intervene directly in decisions about treatment of severely handicapped infants.

But two medical organizations countered that the administration was overreaching, and that the federal law banning discrimination against the handicapped does not, as the government contends, justify federal "Baby Doe squads" to second-guess parents and doctors in decisions to withhold medical treatment.

The highly emotional issue began in 1982 when a Bloomington, Ind., infant known only as "Baby Doe" was born with Down's syndrome and a blocked esophagus and was permitted to die.

Following a public controversy, the Reagan administration issued rules to force hospitals to treat severely handicapped infants even without parents' permission. Those rules were struck down by the courts, but similar regulations adopted in 1983 were used to try to get medical records to investigate a second case, "Baby Jane Doe" in New York.

A federal appeals court denied access to the records, saying that Congress, in banning "discrimination," did not intend to include decisions involving the treatment of newborn infants. The infant received treatment and is living with her parents on Long Island.

Assistant Attorney General Charles J. Cooper, asking the justices to overturn the appeals court, said the rules were appropriate because the Rehabilitation Act of 1973 -- the discrimination law in question -- prohibits hospitals receiving federal funds from withholding treatment for the handicapped.

Cooper argued that "infants are entitled no less than adults to the same treatment. To say otherwise defies common sense."

But Richard L. Epstein, an attorney for the American Hospital Association said the administration was "grasping" at a law designed to ban discrimination in jobs and education to include "private, parental choices as acts of discrimination."

If the court were to agree with the administration, Epstein argued, it would open the door to federal regulation of every medical treatment decision a hospital makes, from infants to the elderly.

Benjamin W. Heineman Jr., representing the American Medical Association, argued that the regulations must be struck down because Congress did not intend to allow such a federal role in an area traditionally left to the states to regulate.

"The government's briefs are striking in their failure to cite any congressional intent to supplant" state regulations, he argued. The administration therefore needs to show a major problem, such as a failure by state agencies to ensure appropriate treatment, in order to justify federal intervention. Cooper could not to cite instances of the states shirking their duties, he said.

Several justices, led by Justice Sandra Day O'Connor, questioned Cooper sharply on the effect the proposed regulations would have in various situations.

"What has been the practice in the 50 states?" O'Connor asked. Cooper replied that it varied widely.

"Would the regulations had they existed in 1982 have saved Baby Doe?" Justice John Paul Stevens asked.

"There would have been no different result under these regulations," Cooper conceded.

Justice Byron R. White suggested that the rules would have the federal government "looking over doctors' shoulders at treatment decisions."

The case, which found the Reagan administration in the unusual posture of arguing for an especially broad interpretation of a civil rights law, also found Justice Thurgood Marshall advocating a states' rights position.

"What's involved here," Marshall told Cooper, "is what is the right of the federal government to move into an area that for centuries has been a state matter."

A decision is expected by July. Justice William H. Rehnquist did not participate in the case because his son-in-law's law firm works for the American Hospital Association.