The Soviet Union has had a "high-level military mission" in Afghanistan for the past week, possibly presaging increased Soviet arms aid to the pro-Moscow government that is under attack by tribal rebels and Moslem nationalists, it was learned yesterday.

The Soviets already have 2,000 to 3,000 military men in "civil adviser" roles in Afghanistan, which borders the Soviet Union, Iran and Pakistan. Some of those advisers may map counterinsurgency strategy and direct gunfire. But Soviet combat units as such are not believed to be in the country.

However, State Department officials said the secret military mission is led by two Soviet generals, including a commander of ground forces.

Moscow has accused Iran's new revolutionary government and the Central Intelligence Agency, among others, of fomenting the fighting in Afghanistan, which some observers consider to be a potential "Soviet Vietnam" for Moscow.

A military pro-Moscow and stable Afghanistan could aid northern tribesmen to Iran who seek to break away from the Ayatollah Ruhollah Khomeini's rule, thereby increasing economic difficulties that might further cut Iran's oil production.

Pakistan perceives the pro-Moscow Kabul government as a sufficient threat to support, at least tacitly, some of the rebels against that regime.

The neutralist Kabul government was overthrown last year by Marxist army officers, and in economic, military and technical assistance pact with the Soviets was signed.

Several countercoup attempts were put down by the Kabul government while its military fought Pakistan-based insurgents.

The current assessment in Washington is that the rebels continue to gain, but that the Afghan government still controls the population centers and main roads and railroad lines.

U.S. officials are operating on the assumption that the Soviet military mission was sent into the country to make an on-the-ground assessment of the situation with a view to shoring up the government.