Afghan President Babrak Karmal has signaled a possible new purge of government officials and members of his ruling Marxist party who fail to make "eternal friendship" with the Soviet Union their main objective.

Babrak's remarks, including an attack in which he called some party members and government workers corrupt and lazy, appeared certain to divide further the already splintered country. It also seemed likely to enhance the anti-Soviet feeling among many of the intensly nationalistic Afghans who have been battling the Soviets since they invaded the country last December with more than 85,000 troops.

The speech appeared to observers here to be aimed at the ruling People's Democratic Party of Afghanistan's more nationalist Khalq (masses) fraction, which reportedly has opposed the Soviet Union's tightening economic, political and military grip on Afghanistan.

According to reports reaching here from diplomatic sources in the Afghan capital of Kabul, some Kabul, some Khalq members even have begun allying themselves with rebel groups that are fighting Soviet and government troops. Others rfeportedly have formed self-defense committees for protection against a possible purge.

Babrak's speech came amid speculation among Afghan refugees here that Soviet and Afghan troops were about to launch a major assault against rebel fighters before winter.

The speculation was sparked by a report on Radio Afghanistan Saturday saying that military maneuvers would start this week in Afghanistan's eastern provinces bordering Kabul.

Babrak's little-noticed speech was made to party faithful in Kabul Thursday night, shortly after his retrun from Moscow, and a translation broadcast on Radio Afghanistan was received in New Delhi today.

Diplomats who normally keep a close watch of Afghan affairs called some of his statements "incredible."

Among other points, Babrak for the first time acknowledged what diplomats have been reporting for months: that Soviet advisers and experts have permeated every level of the Afghan government, in many cases doing most of the work and making most of the decisions.

While Babrak said the Afghans have much to learn "from the technical expertise of our Soviet comrades," he criticized some government officials and party workers who "lay all the burden and responsibility for practical work on the shoulders of the advisers."

But the major thrust of his speech, apparently reflecting decisions made during his meetings with the Soviet hierachy, enphasized what Babrak called "the basic measures and yardsticks for the appraisal of every member of the party from top to bottom and of party and government officials from top to bottom."

The principal new criterion, he declared, will be "the pursuance of eternal friendship and solidarity with the Leninist Communist Party of the U.S.S.R., friendship between our countries and our peoples."

No longer, Babrak said to what sounded to the radio monitor as applause, would assessment of party members be based on previous service or relations with either persons or groups.

Even heroism, he said, will no longer be a ticket to party leadership.

While the "struggle against the counterrevolutionaries" [the rebels] and pushing the party's economic and social aims will play some role, Barbrak made it clear that loyalty to the Soviet Union is now the main criterion for advancement in the government and party.

This, observers here said, goes against the grain of the traditionally deep Afghan nationalism. Afghans historically have fought against all invaders, and one Afghan emigre source here commented that the only thing that stops Afghans from fighting each other is an outside invader against whom they can unite.

Thus, the Soviet Union and Babrak's government may be making their task of winning broad approval for the new Marxist administration even more difficult.

Soon after the Marxists seized power in a bloody coup in April 1978, opposition developed among the intensely conservative and Islamic Afghans who feared that reforms such as education for women and an end to bridal payments would change their religious and social life.

That feeling, centered largely in Afghanistan's rugged, mountainous countryside, provided the original push for the civil war, which has now become a mass popular uprising in both cities and the countryside against the Soviet occupation.

Nonetheless, Babrak repeated that the important duties of the ruling party are to wipe out the rebels, establish government "sovereignty" throughout the country, win the support "of the wide masses of the people" and achieve social changes.

He said the government has improved its position in recent months and praised what he called "the limited U.S.S.R. military" assistance.

Babrak showed how deeply the Soviet Union has moved into Afghan economic affairs when he revealed that Moscow now provides 80 percent of his country's foreign aid.