Foreign Minister Moshe Dayan disclosed yesterday that Israel is selling arms to the Marxist government in Ethiopia to assist that country in its fight against neighboring Somalia and in its efforts to put down a rebellion in its northern provinces of Eritrea.

Dayan's remarks confirmed press reports from correspondents on the scene of continuing Israeli aid to Ethiopia.

By going public, however, Dayan has put Israel in the curious position of being an acknowledged, if indirect, ally of the Soviet Union in Moscow's military backing of Ethiopia at a time when the United States and the West are expressing growing concern about Soviet intentions in the Horn of Africa.

Dayan's comments, made on his arrival in Switzerland on a visit yesterday and broadcast here over Israeli Radio, took the Israeli Foreign Ministry by surprise.

It is the first time that Israel has admitted giving military aid to Ethiopia since Emperor Haile Selassie was overthrown in 1974 and his regime replaced by a Marxist, pro-Soviet junta. Officials here said they could add nothing to Dayan's remarks.

"We are selling some arms to Ethiopia," Dayan said. "We have had co-operation with Ethiopia for years and years, never with Somalia. We want to retain the good relationship with Ethiopia. The fact that we are on the same side as the Soviets in this matter, well, that's another question."

Dayan said that the aid to Ethiopia had a great deal to do with "the fact that we are having out oil tankers going through the Red Sea" on which Ethiopia borders. "We want very much to retain good relationships with the countries along the Red Sea."

Correspondents have also reported the presence of Israeli military advisers in Ethiopia.

Israeli military aid to Ethiopia was no secret in the days when Ethiopia was a pro-Western and predominantly Christian monarchy that enjoyed the full backing of the United States. Haile Selassie used to call himself "the Lion of Judah" and there have traditionally been close connections between Ethiopia and the Holy Land.

But the present Ethiopian regime ended its military cooperation with the United States last year and has turned to the Soviet Union instead in its struggle against Somalia and the revolt in Eritrea Province.

The Soviets have mounted a large-scale airlift of military equipment to Ethiopia amounting to at least $800 million and there are reports that Ethiopian troops are about to go onto the offensive. The United States has expressed concern lest Ethiopia becomes a new Soviet bastion in the Horn of Africa.

There is some irony in the fact that while Israel now admits helping Ethiopia, Prime Minister Menachem Begin continues to tell Israelis that it would be impossible to allow the Palestinians to have a state because they would invite in the Soviets, who, he contends, would then establish a base there and fly in weapons from the Soviet Union.

If the Somalis and the Eritreans succeed in their arms struggles, Ethiopia could be cut off completely from the Red Sea.

That Israel continues to back Ethiopia despite recent political changes in that country might be interpreted as a gamble that, despite internal weaknesses, Ethiopia can prevail, and an indication that Israel would rather help an old friend than stand aside while Moslem countries take over the strategic approaches to the Red Sea.