After months of holding out against opposition demands that he abdicate and leave the country, Shah Mohammad Reza Pahlavi will depart Tuesday for Egypt on the first leg of a vacation that may end up as permanent exile, according to reports here and in Egypt.

In Cairo, the Egypian government said President Anwar Sadat was preparing to receive the 59-year-old shah on Tuesday at the southern Egypitan town of Aswam. A self-styled unofficial palace adviser here who first revealed the departure plans said the monarch ultimately would go to the United States.

Official spokesmen for the shah denied the reports of plans for imminent travel. But there were signs here that the final countdown had begun on the monarch's 37-year-old reign, in circumstances that undermined his desire for an orderly, dignified exit for what the palace still describes as a "winter vacation."

The palace announced tonight that the shah will hold one of his rare news conferences at 11 a.m. Tuesday.

Insiders reported that the Court Ministry, a sort of parallel government in the days when the shah was Iran's absolute ruler, was all but deserted after special military planes flew key personnel abroad yesterday. The same hasty departure scenes were reported among members of the staff of Empress Farah.

The empress' mother flew to McGuire Air Force Base, N.J., today in an Iranian Air Force plane with the last two of the royal couple's children still in the country, Princess Leila and Prince Ali Reza.

But more serious in the long run than the familyhs moverments were unanswered questions about what would happen within Iran once the shah's departuere removes the glue -- oposition to his rule -- that has kept the disparate opposition together in the year-long revolt.

The sovereign's hand-picked Senate approved Prime Minister Shahpour Bakhtiar's government -- 38 votes for, one against and two abstentions -- paving the way for an expected vote of confidence Tuesday in the Majlis, or lower house. Nineteen of the Senate's 60 members chose not to vote, possibly because of telephoned threats.

Once the final formality of the Majlis vote is out of the way, the shah is expected to leave promptly. With soldiers and anti-shah protesters fraternizing openly in Tehran's streets, tossing carnations, apples, oranges and pistachio nuts at each other, the monarch is thought to have stayed on so long only because Bakhtiar felt his absence would compromise the Majlis confidence vote.

The shah's reported decision to make his first stop a visit to Sadat in the upper Egyptian resort town of Aswan was unexpected, but fit in with the two men's personal relations. They became close when both attended an Islamic conference in Morocco in 1969 to discuss what action the Islamic world could take against Israel.

The shah visited Egypt last in January 1978 and is known to have provided Sadat with financial aid, including a large shipment of oil during a 1974 supply crisis in Egypt.

The most crucial question mark here involves the plans of Ayatollah Ruhollah Khomeini, the 78-year-old leader of Iran's religious opposition.

Many Iranians expect him to return from exile in France almost as soon as the shah leaves, ending his 15-year exile. But more politically sophisticated Iranians worry about an army coup d'etat unless Khomeini drops his plans for sweeping aside Bakhtiar and installing an Islamic republic.

In an apparent effort to calm those fears Lt. Gen. Abbas Gharabaghi, the army chief of staff, said in a newspaper interview that he could "not imagine" any officer being involved in such a plot.

Bakhtiar, asked about Khomeini's plans, said he hopes the influential clergyman will on his return "play a Gandhi role," an allusion to the Influence exercised from outside the government by Mahatma Gandhi, the leader of India's nonviolent independence struggle in the 1940s.

The fear of an army coup was the main message from Hossein Amir-Sadeghi, the 29-year-old son of the shah's former chauffeur and selfstyled palace adviser who announced the departure plans. In a meeting with reporters, he also provided what he purported were the sovereign's thoughts about the situation.

Such is the Iranian taste for Byzantine indirection that observers, and some diplomats used to place ways, did not rule out the shah's using the young man to convey his message.

The official place spokesman, Kandiz Yazdanpanah, denied even knowing the young man. But Yazdanpanah's superior, protocol chief Aslan Afshar, said only that the man was known at court and that even members of lowly staff families often had direct access to the shah.

Amir-Sadeghi said the shah would go "reluctantly" to the United States as a final destination, apparently because only the Americans can guarantee his security. Possible way stations included Mecca, in Saudi Arabia, and Kerbela, in Iraq, holy places respectively of the Sunni and Shiite branches of Islam.

Amir-Sadeghi said the royal family spent the last few days feciding which clothes and photo albums to take with them. He singled out the empress for praise, saying she had been "an inspiration to the shah," and "the only sane one around."