The attackers, armed with rocket-propelled grenades and machine guns, faced no resistance from the 5,000 inhabitants of Al Bas, a refugee camp outside the port city of Tyre, 46 miles south of Beirut, police sources said. The Shiite Moslem Amal militia rounded up hundreds of people in the camp`s main square, executed a teacher before the crowd and arrested 120 Palestinian civilians, a police source said.

''Before pulling out, the militiamen also set 70 homes and shacks ablaze as the refugees watched helplessly,'' the source said.

Amal, locked in a 5-week-old battle with Palestinian guerrillas in Beirut and southern Lebanon, had no immediate comment.

Al Bas, unlike other Palestinian refugee camps in Beirut and southern Lebanon, has no known guerrilla presence and has avoided the Amal-Palestinian conflict.

Amal is trying to prevent the return of a Palestinan military presence, which was quashed when Israel invaded Lebanon in June, 1982.

In Beirut, Amal, backed by Soviet-made T-54 tanks supplied by Syria, pounded the besieged Chatilla refugee camp for the third day Wednesday, but unrelenting Palestinian guerrillas returned fire from the nearby Shouf mountains, security sources said.

The sources said Palestinian gunners, entrenched in the Druse-held Shouf mountains, fired rockets at hundreds of Shiite militiamen fighting to destroy a belt of rubble and earthworks and enter the Chatilla camp.

Palestinians and members of the Amal militia also traded fire around Al Rashidiyeh camp in southern Lebanon and the hilltop Christian village of Maghdousheh, 25 miles south of Beirut.