Prime Minister Menachem Begin moved today to stem the rising tide of public impatience with the stalemate in Lebanon by appealing to Israelis for national unity as the country approaches the first anniversary next Monday of the invasion that set off the war.

Begin, goaded by the acid comments of an opposition Labor Party member who publicly questioned the decision to launch the war as well as the prime minister's leadership during the conflict, made the emotional appeal during what started as a routine parliamentary debate.

"I call on all factions that are loyal to the state to stand together in this trial, as we have stood in other times . . . . I ask that the same measure of unity which existed at the start of the fighting should continue," Begin said as he called for help in finding conditions that would bring home the estimated 20,000 Israeli troops in Lebanon. His message came two days after two Israeli soldiers were killed and another three wounded in the continuing daily violence that has boosted the number of Israeli war dead to almost 500.

Touching briefly on the recent reports of buildups by Israel and Syrian troops in Lebanon, he declared that Israel has "absolutely no intention of attacking the Syrians" and said that if Syria attacked Israel, "we shall all have to defend our lives, our existence and our future."

Referring to the "Syrian threat," Begin said, "Why should we create the impression that we are divided among ourselves, in these days of tension and of preparations by Syria? I don't think it's a positive action to present matters thusly."

The divisions Begin referred to have existed from the outset of the war but were muted by Israel's military success and the protracted negotiations that two weeks ago achieved an Israeli troop withdrawal agreement with Lebanon. A majority of Israelis still support last year's decision to go to war and its military objective of destroying the Palestine Liberation Organization stronghold in southern Lebanon.

But with the one-year milestone of the war approaching with no sign that the troop withdrawal accord will be implemented soon and with the number of attacks on Israeli soldiers in Lebanon on the rise, new indications of impatience and dissent have begun to appear.

This week Israel's small Peace Now movement is staging a march from the Lebanese border to Tel Aviv, where it plans to hold an antiwar rally Saturday night. Peace Now consistently has strongly opposed the war, but it recently has been joined by a new organization, called Parents Against Silence, in demanding a unilateral Israeli pullout from Lebanon.

About 2,000 members of the parents' organization, started by the parents of soldiers who are serving in Lebanon, staged their own demonstration this week outside Israel's parliament, the Knesset, where they chanted, "Bring the boys home."

Another group for weeks has been holding a vigil outside Begin's house where it displays a sign with the number of Israeli soldiers killed in Lebanon. Today, the number on the sign was 490.

These developments have come against a backdrop of mounting domestic economic turmoil that yesterday forced the government to take some politically unpopular steps. The government announced new measures to raise the price of imported goods, in order to cut Israel's growing balance of payments deficit, and said it will soon introduce legislation to impose a tax on bank checking accounts. The proposed bank tax is a means to finance Israel's continued military presence in Lebanon.

Begin is not the only senior government official recently to decry domestic dissent over the war. In a speech last week, Defense Minister Moshe Arens sharply criticized conscientious objectors in Israel and those who have refused to serve in Lebanon.

"All of those who in one way or another create the mistaken impression across the border that the motivation which has existed in the state of Israel during the 35 years of its existence no longer exists, they should stop, they do harm to all of us," Arens said.

Begin's statement today, which had not been expected, was prompted by a speech by Labor Party Knesset member Michael Bar-Zohar, who was demanding a full-scale parliamentary debate on the war.

"Would you have agreed to the war if you knew then it would cost 500 dead boys, 2,700 wounded, 600 permanent invalids?" Bar-Zohar asked. "Would you have given the order then, if you knew it would last a year?"

Bar-Zohar also derided Begin as "a prime minister who for the past few weeks does not speak out to explain the Lebanon situation to the public" and whom "the soldiers in Lebanon have not seen" since early in the war when Begin visited strategic Beaufort Castle, a one-time Palestinian guerrilla stronghold, after it was captured by the Israeli Army in bloody fighting.

Bar-Zohar's observation about Begin's quiescent manner indirectly raised a touchy subject. For weeks, the prime minister rarely has spoken in public or given other indications of active leadership, prompting private speculation about the state of his physical and emotional health.

The speculation, however, has been subdued since Begin, whose wife died in November, has gone through previous periods of apparent inactivity, only to confound his critics by later emerging with renewed vigor.

In response to Bar-Zohar, Begin conceded that "the situation is difficult," but said that Israelis must remain "on our guard" because of Syria's refusal to withdraw from Lebanon.

Begin added that "western spokesmen," whom he did not identify, agreed with the recent Israeli military alert in response to the Syrian military buildup in Lebanon's Bekaa Valley and Syrian troop maneuvers near the Golan Heights.

Following the Knesset session, Begin met with U.S. special envoy Philip C. Habib to discuss U.S. efforts to persuade Syria to withdraw from Lebanon. Israel has made its withdrawal contingent on a simultaneous pullout by Syrian and PLO forces.

No details of the meeting were made public, but Habib said he will return to the United States Thursday and Israeli radio described his effort to bring about a Syrian troop withdrawal as a failure.