A man described as having unspecified foreign connections has been arrested and allegedly has confessed to the assassination of Lebanon's president-elect Bashir Gemayel last month, the Christian Phalangist Party announced today.

According to another report, Gemayel's alleged assassin worked for the Phalangist Party's own security services and was in contact with a liaison man who disappeared after the murder. The Central News Agency, a local service that carried the report, said the second person belonged to an "ideological organization well known for its links abroad."

The man in custody was not identified, but the Phalangist Party newspaper Amal said he had connections with unidentified "foreign quarters," which it said were implicated in the huge explosion that took the Lebanese leader's life Sept. 14.

The newspaper also said the party's security branch had apprehended three men who confessed to the attempted assassination of Gemayel in a car bomb explosion two years ago in which Gemayel's 18-month-old daughter Maya was killed.

Those men, it said, had been working on behalf of an unidentified Palestinian group. Without saying so directly, the newspaper left the suggestion that the man arrested for murdering Gemayel may have been linked to the same group.

The investigation into Gemayel's murder was reported to have been conducted by Elie Hobeika, the head of the Phalangist Party security services and intelligence. Hobeika has been named by the Israelis and in Western press reports as the officer who, after the assassination, led the Christian militia in attacking Palestinian camps where more than 300 people were slain.

The partial revelations led Lebanese and foreign observers to speculate that the Phalangist Party now believes that one of the radical Palestinian factions with links either to Syria, the Soviet Union or possibly Libya was responsible for Gemayel's death.

Following the election in late August of Bashir Gemayel, Syria violently attacked the president-elect in the state-controlled media because of his well-known anti-Syrian views.

When Amin Gemayel was elected to replace his brother as president, however, Syrian President Hafez Assad sent a warm message of congratulations. If the Phalangists believe Syria to be involved in the murder, their failure to name the "foreign quarters" may be tied to Gemayel's desire not to aggravate relations with Lebanon's most important and most powerful Arab neighbor.

The charge that a Palestinian group was involved could help the Phalangist Party justify the massacre of Palestinian civilians here in the wake of Gemayel's death.

Meanwhile, U.S. special envoy Philip C. Habib arrived back in Beirut today after a tour of Arab countries and a visit to Israel. He met with President Gemayel and was later reported to have discussed the next phase of the Israeli withdrawal from Lebanon, now proposed in conjunction with a similar pullback by Syrian forces in eastern Lebanon.

The first issue, however, is the completion of the Israeli withdrawal from the greater Beirut area, in particular from Baabda, where the presidential palace is located and which is regarded as the seat of government.

It was not known tonight whether any progress was made or agreement reached on this question.

Habib traveled on to Damascus later for talks with Syrian leaders about the larger plan for the withdrawal of all foreign troops from Lebanon, including the remaining Palestinian guerrilla units stationed in the north and east behind Syrian lines.

The Reagan administration is believed to be anxious to take advantage of the initial momentum created by the Israeli evacuation of the capital, including the airport, to get an agreement from Syria and Israel on a total withdrawal.

In addition, Congressional pressure for an early end to the mission of U.S. Marines serving in the peace-keeping force here is thought to be another reason the administration may be pushing for a quick accord between Damascus and Tel Aviv.

Other unconfirmed reports regarding Gemayel's murder included the following:

* The alleged assassin was a resident in the apartment immediately above the room where Gemayel was addressing a local Phalangist Party meeting when the bomb went off.

* The bomb consisted of 77 pounds of TNT, not 440 pounds as initially reported, and was placed in the assassin's second floor apartment two days beforehand, on Sept. 12.

* A highly advanced Japanese-made detonator was used to set off the bomb from a distance of more than two miles from a building in the Christian quarter of East Beirut known as Al Nasrah. The assassin later indicated where he had thrown away the detonator, and it was recovered.

This version contradicts reports in diplomatic circles that the detonator was a crude alarm clock.

* The assassin was "not a Moslem," and his entire interrogation and confession have been recorded on videotape. He is still alive, in relatively good physical condition and may well go on trial.