Amid continued official optimism, Egyptian leaders sounded a note of caution today about the outcome of Sunday's Egyptian-Israeli summit.

While not backing away from his assertions that an accord on the broad outlines of a peace settlement was within reach, President Anwar Sadat acknowledged that his meeting with Israeli Prime Minister Menahem Begin may not bring the results that Egypt had expected.

Sadat's acting foreign minister, Boutrous Ghali, observed that "you cannot settle a conflict of 30 years in 30 hours."

In the telephone interview, Ghali said there was "no reason to retreat" from the optimism that has infected all Egypt, with official encouragement, since the announcement that Begin was coming. He noted, however, that "even if you reach an accord," on chapter headings or on outlines, "it will take time to work it out."

He measured views coincided with warnings coming from Washington that the Sadat-Begin summit might not produce the major breakthrough that Egypt has been predicting, or at least not as quickly as many Egyptian officials hope.

It contrasted sharply with the continuing spate of glowing reports in the Cairo press to the effect that the visit here of Israeli Defence Minister Ezer Wiseman had already led to broad understandings on the nature of peace and how it is to be implemented.

The well-informed newspaper Al Gomhouria said Weizman told the Egyptians that Begin is prepared to "go beyond his previous declaration as regards the Palestine problem and (troop) withdrawal, associated with guarantees of peace and peace arrangements." Other papers quoted a senior official source, which means the foreign minister's office, as saying Begin "is ready to make significantly greater concessions than those previously revealed."

According to Ghali, there is "good faith on both sides" and an agreement that "we must keep up the momentum." He pointed out, however, that even in the preparatory talks that recessed yesterday after a desultory week of negotations "we are just at the beginning of the process. Even if you get a declaration of intent, it will take time."

He confirmed that the "real problem" is that of the Palestinians but he did not say whether he was referring to an Israeli military presence on the West Bank of the Jordan or to the nature of the autonomy that Begin has proposed for the Arabs there.

Sadat, who spoke briefly with reporters after Friday prayers at a mosque near the Suez Canal, reiterated that Israeli "must retreat from all territory occupied in 1967. It is Arab territory. This issue is not negotiable. It is not an Israeli concession."

That has been his official position all along, but it is clear from his own remarks in many interviews and from talks with Egyptians charged with carrying out Sadat's policy that he is not demanding, and knows he cannot get, immediate total Israeli withdrawal from all the territories as a condition of a peace agreement. He wants a declaration of principle that the Arabs have sovereignity over these lands, with the questions of how and when the land should be returned left to future bilateral talks between Israel and its Arab neighbors.

Asked if the conference on Sunday could fail, he said, "Maybe.Why not" The most important fact is that we will be very frank and we shall put everything on the negotiating table."

Sadat, in a speech to the people of Port Said delivered for him by the prime minister, reaffirmed his determination to press ahead toward peace.

"Egypt knows its road and will not turn down any means" of bringing peace and prosperity to its 40 million people, he said. He warned again that Egypt will not be deterred by Arab "rejectionists" sheltered under the cloak of pane-arabism.

Begin is to arrive Sunday and is scheduled to meet with Sadat for six hours. Reports circulated today that the Israeli prime minister might stay the night, and lodgings for him were reportedly being prepared in Ismailia, but Ghali said he had heard nothing about any change in the schedule.

Sadat is to meet on Saturday with Egypt's National Security Council, his top advesers in military, political and intelligence affairs, and then with his Cabinet.

The preparatory peace talks, meanwhile have adjourned until after the Begin visit. The Egyptians expect them to resume at the foreign minister level if the Sadat-Begin talks make any real progress and the official Middle-East News Agency reported that in that case, U.N. Secretary General Kurt Waldhim would join them.