President Carter and Saudi Crown Prince Fahd pledged yesterday to continue the drive for a Middle East agreement despite the potential obstacle of a new right-wing Israel government. But publicly and privately, they also spoke of a disastrous war if the quest for agreement fails.

White House press Secretary Jody Powell said the two men spent little time examining last week's Israeli election, which seems likely to bring to power the Likud Party and its militant leader, Menachem Begin, because they agreed it is "neither possible nor productive to prejudge the ultimate consequences" at this stage.

A White House statement said Carter and Fahd agreed that "the major effort should continue toward trying to reconvene the Geneva [peace] conference in the second half of 1977." There was no attempt in the statement to reconcile this drive with the hard-line stand taken by Begin against the return of occupied Arab land in the West Bank and Gaza areas.

Wearing an ivory-colored desert robe trimmed with gold thread in the bright sunshine of the White House south lawn, Fahd called on Carter to use "the tremendous moral as well as material capabilities at the disposal of the United States" to bring about an Arab-Israel settlement.

He added that without a "comprehensive and just solution" the problem will remain a source of great danger to the Middle East and the whole world beyond.

In a reference to the effect of failure, Fahd said that "we realize the problems of wars and what wars bring trailing behind them by way of calamities on innocent people." He made no explicit reference to the interruption of Mideast oil supplies and a superpower confrontration which could accompany another Arab-Israeli was.

After a Cabinet Room meeting of a little over two hours between high officials of the two countries, Powell said "the word disastrous was used" in discussing the consequences of another Mideast war. Powell said this part of the discussion was in general terms - "the inevitable suffering which falls upon the innocent, the potential for chaos even after the war is over, the potential effect on relations between nations including those not engages in the fighting."

Powell said the leaders also discussed the benefits that peace would bring to the peoples and states of the Middle East.

In a separate meeting, Secretary of Defense Harold Brown discussed Carter's new arms export policies and assured Fahd that the security of Saudi Arabia continues to be important to the United States and will be so recognized in arms decisions, according to informed sources.

Saudi leaders had expressed concern about the new policies, particularly in light of Carter's sharp criticism, during the presidential campaign, of soaring Saudi arms purchases from the United States.

No Saudi requests for particular weapons were presented by Fahd yesterday. The sources said there is a previous understanding that the advanced fighter aircraft such as the F-15 and F-16 when and if the oil-rich desert nation asks.

There was no talk of an oil embargo and litle discussion of oil during the "relaxed, friendly and serious" White House session, according to Powell. Bilateral matters including energy are expected to come up in Carter-Fahd talks today.

U.S. officials said the focus of yesterday's discussion was the question of the Palestinians, which Fahd referred to during welcoming ceremonies as "the core" of the Arab-Israeli problem. Fahd was reported to have told Carter in detail of Arab views that a Palestinian state should be established on the West Bank of the Jordan and in the Gaza strip.

Earlier this month Fahd told reporters that "all Arabs, including the Palestinians," are ready to negotiate a peace agreement and hinted that the Palestine Liberation Organization will formally accept the existence of Israel in exchange for a Palestinian state in the presently occupied West Bank and Gaza.

"That process by which you would reach a secure homeland for the Palestinians and a secure state of Israel with recognized boundaries in each case was a major topic," Powell said of yesterday's White House meeting. He would not elaborate.

Powell said Carter referred briefly to the legislation, now in its final stages in Congress, which is intended to impede U.S. firms' compliance with the Arab boycott of Israel. Carter called the present from of the legislation consistent with freer trade and non-confrontation, said Powell. There was no report of Fahd's views.