President Reagan said yesterday that he expects the Lebanese army to move into positions now held by Israeli forces in West Beirut, and U.S. officials were understood privately to see some indications of willingness by Israel to begin talks with the Lebanese on a withdrawal.

Publicly, however, the State Department was unyielding in its demands for an immediate pullout of Israeli forces from the Lebanese capital. The United States backed up that position by voting yesterday evening in favor of a U.N. resolution condemning Israel's occupation of West Beirut and calling for an immediate withdrawal.

The resolution also condemned Tuesday's assassination of Lebanon's President-elect Bashir Gemayel and "every effort to disrupt by violence the restoration of a strong, stable government in Lebanon." Details on Page A9

Reagan's comments came at a fund-raiser in Whitehouse, N.J., for Republican Rep. Millicent Fenwick, who is running for the Senate. Reporters were excluded from the affair, but the president's remarks were overheard, Washington Post staff writer David Hoffman reported.

Asked about Israel's move into predominantly Moslem West Beirut, Reagan was more accommodating to the Israeli version of events than other administration officials have been.

"It is true that what led to the move back in was the attack after the assassination of the elected president . . . , the attack on his forces by some of the leftist militia that are still there in West Beirut," Reagan said.

"But I think that the Lebanese army . . . will move in and take over those positions held by the Israelis. I think they the Israelis will withdraw and we hope it will be very soon . . . . "

Israel contends that it moved into West Beirut to separate Moslem and Christian forces following Gemayel's murder. State Department spokesmen contend the Israeli move was unnecessary because the Lebanese army had retained control of the area. It is unclear what attack Reagan was referring to, as correspondents in Lebanon reported that Beirut was calm prior to Israel's move.

Administration spokesmen said Reagan's reference to a Lebanese army takeover of positions now held by Israeli forces in West Beirut was a reflection of Israeli public statements yesterday and some other indications, received through diplomatic channels, of possible talks between the Israelis and the Lebanese.

The sources stressed that Reagan still seeks an immediate withdrawal of Israeli troops and that this is reflected in the U.S. statements made Thursday, last night's U.N. vote and the statements made at the State Department yesterday. All these actions, the sources said, were taken at Reagan's direction.

State Department spokesman John Hughes underscored the hard-line public U.S. posture again yesterday and said that U.S. special envoy Morris Draper had told Israeli officials in "plain and firm" terms that "we are asking for an immediate withdrawal of Israeli forces from West Beirut." Hughes emphasized the word "immediate."

Hughes also said the United States had sought and received an apology from the Israeli government for an incident Thursday in which an Israeli officer fired at a Marine stationed atop the U.S. Embassy in West Beirut.

White House spokesman Larry Speakes said that the shot missed the Marine by two feet as he and three other guards were standing security watch. None fired back, Speakes said.

He said the incident occurred in broad daylight, that the American flag was flying at the embassy and that the guards' positions had been pointed out earlier to both the Israelis and the Lebanese.

U.S. officials maintained yesterday that they had received no official response from Israel to U.S. demands for an immediate withdrawal of its troops.

They characterized reports of an Israeli offer to withdraw when the Lebanese army is considered ready to take control in West Beirut as inadequate, emphasizing the U.S. demand for an immediate pullback.

In his regular briefing, Hughes also took issue with Israeli claims that Draper had been misinformed about Israeli assurances that the move into West Beirut was "limited and precautionary."

"We are not going to get into a debate on who said what to whom, but as a result of statements during the summer and after the assassination of Gemayel, the U.S. was under the impression Israel had no intention of occupying West Beirut," Hughes said. "I don't think Mr. Draper was misinformed."

Undersecretary of State Lawrence S. Eagleburger privately outlined the administration position on the situation in West Beirut to interested senators yesterday, and reportedly reiterated U.S. reservations about following up its demands for a troop withdrawal with a reduction in economic or military assistance to Israel.

In his comments in New Jersey, Reagan also said that "even though at this time we are urging Israel to move, that doesn't mean we've moved one step away from our moral obligation to the preservation of Israel as a sovereign state."

The president linked his hope for a speedy pullout to his Middle East peace initiative, saying: "We've made great progress since my speech the other night about a plan for the Middle East--great progress with the moderate Arab states--and I think we are on the way with hope for a solid peace in the Middle East."

U.S. officials, elaborating on Thursday's incident involving the Marine, said an unidentified Israeli colonel sent a Lebanese interpreter to the door of the embassy to warn that the Israelis might have to fire on leftist militia thought to be in the area.

An embassy official protested that there was no need for shooting, that the chancery was clear of any militia.

At this point, the colonel disclosed that he had already fired a warning shot at people seen on the roof of the chancery. Speakes said the Israeli government has apologized, declaring that the officer feared the Marine was a sniper from a leftist Palestinian militia group.

The shooting was the third confrontation between Israeli and U.S. forces in Lebanon that the administration has considered serious enough to protest.

The first was on Aug. 7, when two Israeli F16s buzzed two American helicopters carrying military planners to the aircraft carrier Forrestal after a trip to Lebanon to meet with U.S. special envoy Philip C. Habib.

The second confrontation occurred the next day, when an Israeli army officer refused to let the American team planning the PLO evacuation go from a helicopter landing zone to Habib's quarters until full identification was supplied.

The Israelis also drove vehicles onto the landing area to prevent the helicopter from returning to pick up the team.

The most controversial use of Israeli military force against Americans was a 1967 attack on the USS Liberty spy ship, which was eavesdropping on the Arab-Israeli war.

Thirty-four Americans were killed in that highly controversial incident, which Israel insists was a case of mistaken identity but which many on the ship contend was a premeditated attack.