The terrorist attack on the Egyptian Embassy in Ankara has produced a sharp increase here in official and public resentment against Palestinians and hard-line Arabs combating President Anwar Sadat's peace treaty with Israel.

The anger, in effect, has provided Egypt with another plank in it s platform for negotiating a peace settlement with Israel, aligning Egyptian public opinion even more solidly behind Sadat and against those who accuse him of treachery.

In the assessment of experienced observers here, the ultimate result will be to reinforce Sadat's determination to ignore his opponents, find a solution in the West Bank autonomy talks and proceed with normalization of relations and co-operation with Israel.

The outrage softened somewhat when news reached here from Ankara this morning that Ambassador Ahmed Gamal Olema and all but one of his Egyptian staff survived the takeover. Nevertheless, low-ranking Egyptian officials and Cairo newspapers were talking of the possibility of revenge.

Prime Minister Mustafa Khalil called in his Cabinet for a session during which, officials said, a discussion of possible retaliatory actions was on the agenda. Khalil made no announcement at the end of the three-hour meeting, however, and Minister of State Mansour Hassan said, "Retaliation against innocent individuals was never on our mind."

This seemed to rule out expulsion or harassment of the thousands of Palestinians, including many students, who live in Egypt. Several months ago, after a particularly bitting verbal attack by Palestinian guerrilla leader Salah Khalaf - who also is known as Abu Iyad - Sadat had publicly and pointedly reminded him that his son was studying in Cairo at the sufferance of Egyptian authorities.

Diplomatic retribution also appeared out of the question. Yasser Arafat's Palestine Liberation Organization, along with all Arab League nations except Sudan, Oman and Somalia, broke relations with Egypt after Sadat signed the treaty with Israel in Washington on March 26.

In any case, the government-guided press today seemed to shift the emphasis of its condemnation from the PLO to Syria, which was blamed for financing and instigating the Ankara attack through the Saiqa Palestinian guerrilla group that has close ties to Damascus.

The "Eagles of the Palestinian Revolution," a little-known group that claimed responsibility for the embassy takeover, reportedly is a "dirty tricks" arm of Saiqa. It has been blamed for a series of earlier attacks on Egyptian targets. The two prisoners whose release the Ankara terrorists demanded have said they were dispatched by the Eagles and Syrian intelligence to set of bombs in Cairo.

Khalil said Egypt never seriously considered releasing the two - identified as Joseph Selim Abdullah, a Lebanese, and Ibrahim Dayah, a Syrian - from the Egyptian jail where they are serving life sentences after being apprehended this spring carrying explosives at Cairo Airport. CAPTION: Picture, Two of the Guerrillas who seized the Egyptian Embassy in Ankara give victory sign after they surrendered and left. AP