Egyptian President Anwar Sadat said yesterday that the only obstacle to a quick peace agreement in the Middle East is the "expansionist ambition" of Israeli Prime Minister Menachem Begin.

He made public what has been an undeclared aim of Egyptian negotiating policy for some time - to undermine Begin, whom Sadat regards as an inflexible fanatic - in the hope of seeing him replaced by another Israeli leader more responsive to Egypt's proposals.

Sadat did not specifically rule out a resumption of direct peace negotiations, but he left very little room for optimism about progress toward an agreement so long as Begin heads the Israeli government.

"If Israel really wants peace, peace can be established within hours," he said in a nationally televised speech.

"The only obstacle is that the prime minister believes he can have peace, and security guarantees, and recognition, and the land.We say peace, yes, Security guarantees for both sides, yes. Good neighborly relations, yes. Recognition, yes. But the land and sovereignty, no, a thousand times no. We do not bargain over the land."

Sadat spoke on the eve of a possibly crucial Israeli Cabinet meeting in which Begin and his ministers are to take up Egypt's proposals for a territorial settlement on the West Bank of the Jordan and to discuss the outcome of last week's American-sponsored negotiations in Britain.

The Israeli Cabinet is reportedly deeply split over how to respond to the Egyptian plan. By trying to play on that split and discredit Begin's approach, however, Sadat might naturally rally support in Israel for the prime minister, rather than bringing him down.

Sadat himself noted in the speech that he had been told by Israeli Foreign Minister Moshe Dayan that Israel is "one country" whose leaders put aside their differences in times of crisis. A frontal attack on Begin by Sadat could have the opposite effect that he desires. In any case, there is little solid evidence to show that any other Israeli leader would come close to satisfying Sadat's demands for a full Israeli withdrawal from the occupied territories.

Sadat has made it plain that he expects no progress toward a peace agreement so long as Begin is in power. He sought to provide new material for those inside Israel who are unhappy about the way Begin is conducting the negotiations.

Sadat portrayed himself as having a closer relationship with President Carter, whom he praised as "a man who acts out of principles and ethics."

Recalling the quick U.S. action in putting last March's Israeli invasion of South Lebanon before the United Nations. Sadat observed that "if Carter had been in power in 1967 instead of the Zionist Arthur Goldberg, we would not have suffered as we have suffered." Goldberg was the American ambassador to the United Nations at the time of the 1967 Middle East War.

Sadat also implied that he found both Israeli Defense Minister Ezer Weizman and opposition Labor Party leader Shimon Peres to be more flexible than Begin when he met with them recently in Austria.

Begin is reported to have been upset by these meetings, which he apparently viewed as freelance attempts to undercut his position as representative of the Israeli people. Sadat said he would continue to meet Israeli government and opposition party officials whether Begin likes it or not.

Sadat, who attached these comments to his address, a two-hour survey of Egypt's domestic affairs only after he was briefed by Foreign Minister Mohammed Ibrahim Kamel about the talks last week, said Dayan admitted at those talks that "it was the land [the Israelis] were after."

The Israelis say they need the land to ensure their own security. Sadat said, but "we shall not cede one inch of our land for their security guarantees."

As Sadat noted, this returns the Middle East peace negotiations to where they were when Sadat outlined his peace terms in his speech to the Israeli parliament last November. Egypt is offering Israel peace and diplomatic recognition, just as the Israelis have always said they wanted, but is demanding a price the Israelis say they cannot pay - a return to the boundaries that existed before the 1967 war.

The Golan Heights and the Sinai, are side issues, Sadat said. The real issue is the West Bank and the Palestinian question, for which no solution is in sight.

Sadat addressed the nation on the 26th anniversary of the revolution that toppled the Egyptian monarchy. It is an occasion, he said, that finds Egypt in a "crisis of ethics and morals" that demands strong action.

He ordered the dissolution of the Arab Socialist Union, which until last year was the only legal political organization in the country, attacked the other existing political parties for alleged abuses of the political liberalization Sadat has permitted, and announced that he was forming his own party.

Sadat said every organization in the country would be expected to draft and abide by a moral code.

Although this leaves him as president, leader of what will surely soon become the dominant political party, and master of a docile parliament. Sadat insisted that "there will be no going back to the days of one-man rule or one-party rule."

Is is not clear just what constitutes the crisis that prompted Sadat to take these actions, or how the proposed code of honor will be put into practice. Sadat had already cracked down on dissent to the extent that one opposition party dissolved itself and another suspended activities. Sadat himself noted yesterday that "it is only a minority, a few who are resorting to the campaign of doubt and trying to spread rumors."