At least one Moslem demonstrator and possibly as many as five were killed last night when Lebanese Army troops fired machine guns to disperse squatters protesting the bulldozing of homes near Beirut's airport.

Hundreds of U.S. Marines a mile away took cover to escape stray bullets in their closest brush with a serious outbreak of violence since they returned here two weeks ago as part of a multinational peace-keeping force.

Lebanese officials told members of the peace-keeping force that one demonstrator was killed and six injured when the troops fired into the air after they were stoned by protesters. But a leader of the Shiite Moslem militia Amal, which organized the protest, charged that the Lebanese Army fired directly into the crowd, killing five persons and wounding 22.

Moslems in the city buried a youth today who they say was killed in the clash.

Neither the U.S. Marines nor Italian forces, who were deployed about 500 yards from the site of the demonstration and had been assigned responsibility for the sector, intervened in the protest or the Lebanese Army's handling of it.

"It is not our job to interfere with the actions by the Lebanese Army and Lebanese government," Italian military spokesman Capt. Corrado Contatore said. "One of the Army's jobs is breaking up demonstrations."

The outbreak raised anew the issue of the U.S. Marines' role here and the capabilities of the reconstituted Lebanese Army as Lebanon's President Amin Gemayel prepared to fly to the United States Sunday to discuss his country's problems at the United Nations on Monday and with President Reagan in Washington on Tuesday.

By late tonight, no official Lebanese statement had been issued on the incident and no further violence was reported at the site today. Several thousand residents of the squatters' shantytown and the nearby Burj al Barajinah Palestinian refugee camp, however, demonstrated to protest last night's shootings. The Lebanese Army kept troops and armored vehicles nearby but did not bulldoze any more homes.

U.S. Marines, who took shelter in bunkers for about an hour during the firing, said they saw tracer bullets arcing through the sky over their heads. One Marine, who as a precaution was dispatched with four others to a U.S. checkpoint about 700 yards from the scene of the demonstration, said some bullets were flying just slightly over the heads of the demonstrators and himself.

"I could hear the snapping of the bullets about two or three feet over my head," Lance Cpl. Roland Mark Pointer, of Geraldine, Ala., said. "My adrenaline was pumping."

Cmdr. Peter Latrinta, spokesman for the U.S. contingent based at the airport, said that the shooting last night marked "the first time that there has been firing that close" since the Marines first came to Lebanon as part of the three-nation peace-keeping force.

Latrinta said the Marines donned flak jackets and metal helmets for about an hour until the firing stopped. Although he was not sure that all of the 1,200 Marines at the airport had used the protective gear, he and other Marines indicated that most had put it on and taken shelter.

Observers said the incident showed how easily the Marines here can become entangled in violence over which they have no control.

The death was the first in the current confrontation between the government and the Shiite squatters.

The government has sought to evict the Moslems in the southwestern part of the refugee camp since they first came and built ramshackle shelters during the 1975-76 civil war. Officials say that the houses were built without licenses on state-owned or private land and that lights from the community interfere with landing lights at the nearby airport.

This month, the Army began bulldozing shops and a few homes in the camp, where thousands of Palestinians also live. The demonstration began yesterday about 7 p.m., after several homes were bulldozed near an unfinished mosque on the airport road, and rumors spread that the mosque was to be destroyed.

The protesters set fire to piles of rubber tires in the road. The Army sent in two armored personnel carriers of troops, who fired machine guns and automatic rifles, according to residents of the camp and U.S. Marines.

The Italians had withdrawn two armored cars from the mosque, site of the demonstration, during the day yesterday. Cantatore said the armored cars departed as part of a regular program of patrols.

Ali Ammar, a member of the executive committee of the Shiite militia Amal, said that the protest had been called because Gemayel had broken an agreement not to bulldoze buildings people were still using as homes until they had found somewhere else to live.

Meanwhile, a cease-fire reportedly continued to hold today in the Chouf Mountains southeast of Beirut, the scene of four days of clashes between Moslem Druze and Christian Phalangist militias this week. Israeli occupying forces moved into the area Thursday to halt the fighting after the Lebanese Army failed to follow through with its announced plans to deploy there.

Also today, the Beirut weekly magazine Ash Shiraa, known for its support of Libya, said the Libyan government has financed a deal under which the Soviet Union will provide Syrian forces in the eastern Bekaa Valley with a mobile radar station that will improve performance of Syrian antiaircraft missiles in the area.

The magazine said Syria may also be furnished with sophisticated radar aircraft from the Soviets to help defend against Israeli air attacks.