Houari Boumediene, Aleria's ascetic and militant president, is seriously ill and has flown to the Soviet Union for treatment in a convalescent hospital haspital, it was learned yesterday.

Boumediene arrive in Moscow earlier this week. The Societ press announced his arrival but gave no indication that he had come for urgent treatment. The exact nature of the treatment and of Boumediene's illness could not be established immediately.

Boumediene, who has guided Algeria into a leadership role in Third World politics and within the Organization of petroleum Exporting Countries (OPEC) in his 13 years in power, had not been seen in public in Algeria for a month. His disappearance from view sparked rumors here of coup attempts in Algeria, but authoritative sources now discount these reports.

The Algerian leader's prolonged illness is delaying several key domestic and international initiatives, including new attempts by Western countries and moderate Arab states to arrange a settlement in a guerrilla war in the Western Sahara territory that has brought intermittent armed clashes between the Algerian and Moroccan armies since January 1976.

Algeria has supported the Polisario rebels since Morocco and Mauritania annexed and divided between themselves the territory previously known as Spanish Sahara. Polisario, which also Spanish Sahara. Polisario, which also has Soviet backing, is fighting for an independent Sahara republic.

The balance of regional alliances was seriously disturbed in July when a coup d'etat in Mauritania brough to power a group of soldies who unilaterally declared a cease-fire in the guerrilla war, established contact with Algeria and secretly offered to negotiate a settlement that would in effect turn the Mauritanian part of the Sahara over to Polisario control.

But Morocco's King Hasssan - a close U.S. ally - who is due to visit Washington Nov. 14, reacted sharply to these moves. In an Aug. 20 speech, he said Morocco would not tolerate a surrender of any of the Sahara to "Morocco's enemies," and issued what diplomatic observers took to be veiled hints that he would take over the Mauritanian sector by force rather than permit such a deal.

The United States, which is Morocco's main source of military supplies, has sought to maintain a neutral stance between Morocco and Algeria in the conflict. Washington has refused to recognize Morocco's sovereignty over the Sahara and has held up a large arms package requested by Morocco for more than a year because of the strong likelihood Morocco would use arms in the Sahara.

Western efforts for a settlement are reportedly being intensified as the unstable Mauritanian-Moroccan relationship increases the threat of a much wider conflict. Saudi Arabia and Sudan are also becoming more active, in part through mediation efforts by Sudanese President Jaafar Nimeri, who is the current head of the Organization of African Unity.

Movement toward a settlement cannot begin before Boumediene returns from Moscow and re-establishes his grip on the tightly centralized Alerian government, however.

Boumediene's absence from public functions initially drew little attention since the gaunt, shy president is one of the world's most reclusive leaders. His past is cloaked in shadows that hide the exact date and place of his birth, although he is though to be in his early 50s.

Coming out of the ranks of the rebel forces being formed to fight French colonial rule in Algeria, in 1958, he became commander of the rebel army stationed in Morocco.

He became head of the national army under President Ahmed Ben Bella when independence came in 1962, and he took power in a coup in 1965. Since then Boumediene has established Algeria as a leading voice in demanding world economic reform and in championing Palestinian rights. The Soviet Union has accorded Boumediene a dominant position in its relations with the arab world.