A federal judge in New York City yesterday granted a temporary restraining order that will allow - at least for one more week - the continued use of federal Medicaid funds to perform elective abortions.

In making the ruling, U.S. Judge John F. Dooling Jr. said that to cut off abortion funds without a full hearing would needlessly "endanger the lives of the young poor who are most likely to take unwise actions and seek illegal abortions." He set a hearing for Wednesday.

The action appeared to contradict a decision by the Supreme Court last month nullifying an earlier ruling by Dooling that had held unconsitutional a congressional ban on federal funding of elective abortions where a woman's life is not in danger.

The judge acknowledged the apparent contradiction but said he believed there was sufficient confusion on the language of the ban - called the Hyde amendment - to justify further court argument.

Pro-abortion groups, which had sought the restraining order, declared the action a victory, The American Civil Liberties Union called it "a very important development" in its "continuing efforts to ensure that the rights of reproductive choice can be exercised by rich and poor women alike."

But Patrick Trueman, chief counsel of the American United for Life Legal Defense Fund, said the order was "an erroneous" one. He pledged to "continue to press for the legal rights of the unborn."

"Furthermore," he said, "we believe the Hyde amendment will once again eventually be upheld by the Supreme Court."

The immediate impact of Dooling's ruling was to allow the continued use of federal funds to pay for elective abortions in all but six states. It also adds to the public confusion on what has developed into one of the decade's most volatile issues.

The current round in the controversy began June 20 when the Supreme Court ruled that states can refuse to spend public monies on abortions if the operations are not deemed medically necessary. The following week it overturned an orde by Dooling last October that had prohibited the enforcement of the Hyde amendment.

The Hyde amendment had put a one-year ban on use of federal funds to "perform abortions except when the life of the mother would be endangered it the fetus were carried to term."

Laws have been passed in 15 states that ban the use of Medicaid funds for elective abortions, but the prohibition is currently enforced in only six states, according to Planned Parenthood. In 1975, Medicaid paid for about 300,000 abortions, most of them elective. That year there were 1.1 million abortions nationwide.

In that same year, only 18 per cent of the nation's public hospitals performed abortons and an estimated 83,000 women seeking them had to leave their home states to get them.

In yesterday's three-hour hearing, attorneys for the ACLU Center for Constitutional Rights and Planned Parenthood argued that there was great confusion among doctors and social workers over the definition of what endangerment meant and that this should be clarified through the Health, Education and Welfare Department's normal rule-making procedure.

"We said we couldn't argue constitutional questions until we know what HEW's rules and regulations actually are," said Ellen Leitzer, an ACLU attorney. Part of the confusion, she said, results from apparent contradictons between language included in a conference report on the amendment and the amendment itself.

The conference report, adopted to accommodate more liberal language passed by the Senate, leaves open the use of Medicaid funds in cases of rape and several types of disease. House-Senate conferees this week again stalemated on the same issue. President Carter and the majority of House conferees favor the tough anti-abortion language, and HEW Secretary Joseph A. Califano Jr. has said he is prepared to enforce the Hyde amendment.

The federal government argued that Dooling should deny the request for a continued injunction and permit a halt to federal funding of abortions.