Greece has again broken ranks with the European Community, this time on its statement of support for the Israeli-Lebanese accord, just five weeks before Socialist Premier Andreas Papandreou's government takes its turn in the key presidency of the EC's Council.

Foreign Minister Hans-Dietrich Genscher of West Germany, the current community president, announced today in Brussels that all members except Greece joined in support of withdrawal of occupying foreign troops from Lebanon. He described the U.S.-initiated Lebanese accord with Israel as a step in that direction.

In what observers here saw as a strong EC hint that the Papandreou government should conform to the common position, Genscher said he is "convinced" that Greece will align its foreign policy with that of the community once it assumes the chair July 1.

That statement was rebuffed here by Greek Press Undersecretary Dimitris Maroudas, who said "differences of opinion are often expressed on the level of EC political cooperation."

Greece rejected a call last weekend by the European Parliament in Strasbourg to align its foreign policy position on Israel with that of the other nine EC states by establishing full diplomatic relations with Tel Aviv. Greece is the only member not to maintain full ties with Israel.

Foreign Minister Yannis Charalambopoulos told a meeting of EC foreign ministers yesterday that Greece could not go along with the council's communique. He said Greece considers the Israeli-Lebanese accord "one-sided" and stressed that it has been rejected by other Arab states.

Shawki Armali, head of the Palestine Liberation Organization office in Athens, called the Greek move "positive." A spokesman from the Israeli diplomatic office here, maintained despite the lack of full relations, declined to comment.

The developments can be expected to reinforce EC misgivings regarding the possible repercussions of dissident Athens foreign policy positions on community political cooperation during the Greek presidency. The post, taken in rotation, is important because the president enunciates community positions.

Papandreou has persistently taken an odd-man-out course not only in the EC but also in NATO since winning elections 18 months ago. The first instance of this was when Greece dissociated its position from an EC joint communique on Poland in December 1981.

More recently, Athens was out of step with other West Europeans in welcoming a Warsaw Pact proposal for bilateral peace treaties with NATO countries.

Analysts had speculated that Papandreou might moderate his strongly pro-Arab position, which they attribute to his hopes for petrodollar investments in Greece. No such investments have occurred.

Israeli diplomats in Athens also recently reported detecting signs, on the level of such areas as the state-controlled radio and television networks, of the beginnings of a shift in Greek attitudes toward Israel. However, diplomatic observers suggest that a factor persuading Papandreou to persist with his opening to the Islamic world is his effort to woo it away from neighboring rival Turkey on the Cyprus issue.