Abortion rights advocates, government attorneys and a federal judge agreed yesterday that federal law could require states to abandon their Medicaid programs if they refuse to pay for medically necessary abortions.

None of those involved in the key abortion funding case recommended abolishing Medicaid for the poor, but they suggested there is a conflict between the 1965 law establishing the Medicaid program and the Hyde amendment withholding federal funds for nearly all abortions.

Proponents of womens' abortion rights also maintain that legal restrictions on government funding of abortions for poor women violate the constitutional guarantee of separation of church and state. They were expected to argue that point later in the final day of hearings in the protracted suit before U.S. District Court Judge John F. Dooling Jr.

Attorneys for the federal government told Dooling they won't decide for the states what a state's responsibility is in applying for abortions under Medicaid, a state-administered program that receives 55 percent of its funds from the federal government.

But they did not dispute the contention of American Civil Liberties Union lawyers that the 13-year-old Medicaid law requires the states to pay for all eligible patients' medical necessities, regardless of diagnosis.

Dooley suggested that in light of the Hyde amendment "states may continue [Medicaid] or not, but if they continue, they must finance medically necessary abortions alone."