The Security Council, invoking a rarely used procedure, voted tonight to convene an emergency special session of the General Assembly within 24 hours on the Soviet invasion of Afghanistan.

The 12-to-2 vote, with the Soviet Union and East Germany against and Zambia abstaining, came amid strong indications that the Soviets may veto an upcoming U.S. resolution calling for economic sanctions against Iran.

[In Washington, a senior State Department official said that the United States and its major allies will impose economic sanctions of their own against Iran if the Soviet Union vetoes the formal move in the Security Council. The United States expressed confidence that the allies will support such a makeshift arrangement. Details on Page A36.]

In a dispatch tonight from New York, the official Soviet news agency Tass said, "The U.S.S.R. will not tolerate any interference from the outside in the internal affairs of Iran and will not allow the U.S.A. to impose a decision to apply sanctions against it."

But Soviet Ambassador Oleg Troyanovsky, speaking to reporters before tonight's council session on Afghanistan, said he "hadn't seen" the Tass report, and that his government "hasn't taken up a position yet" on the sanctions vote.

The United States is expected to call for a council session Thursday or Friday on economic sanctions against Iran, where militants have held American hostages in the U.S. Embassy in Tehran since Nov. 4.

Although the United States reportedly is not yet assured of the needed nine votes to pass the sanctions resolution, a veto by the Soviets, as one of the 15-member council's permanent members, would alone kill the resolution.

It was a similar Soviet action Monday that precipitated tonight's council session on Afghanistan. Along with nonpermanent member and ally East Germany, the Soviets vetoed a Monday resolution by six Third World council members "deploring" its invasion of Afghanistan and calling for its withdrawal of troops from the central Asian country.

Nearly 48 hours of private consultations followed within the 95-member nonaligned movement of Third World nations, whose sponsorship was considered crucial to international suppport for the measure. Tonight, council members Mexico and the Philippines introduced the expected call to turn the matter over to the currently out-of-session General Assembly under the rarely used U.N. provision called "Uniting for Peace."

Soviet Ambassador Troyanovsky charged that the vote was a continuation of the "pettifogging complaint" of the "Americans and Chinese" on the Afghan situation, and an "attempt to employ the United Nations in carrying on [their] imperialistic and hegemonic plans" in Afghanistan.

Such actions, Troyanovsky said, could "constitute the renewal of the cold war spirit" and would "exacerbate tensions in the Middle East and beyond."

The Soviets charged both in Monday's debate and tonight that their "limited" troop presence in Afghanistan is at the invitation of that government out of fear of "armed aggression" by unnamed other countries, presumably the United States and China.

U.S. Ambassador Donald McHenry did not speak during tonight's session and left the council chamber immediately after the vote.

There is no veto provision under Uniting for Peace resolutions, which mandate an emergency special session of the assembly within 24 hours. Diplomats said tonight that the meeting will be held Friday at the latest and can be expected to continue for at least several days while various members contribute to the debate.

Although tonight's resolution called on the General Assembly only to "examine" the situation in Afghanistan, the discussion almost assuredly will revolve around the original vetoed resolution condemning the invasion and calling for troop withdrawal. A General Assembly resolution to that effect "has no teeth" according to diplomats, and amounts only to presenting the "will" of the assembly. But such an international denunciation of the Soviet action is deemed highly significant.

Diplomats noted, however, that a similar Uniting for Peace approach asking sanctions against Iran would have little effect if the Iranian sanctions resolution is also vetoed. A General Assembly action in that case would not have the weight of law on member nations, as would the Security Council Action, and could only "suggest" that sanctions be applied.

The U.S. draft resolution on Iranian sanctions now circulating among council members calls for the immediate release of the hostages. Failing that, it outlines sanctions to be applied by all U.N. members until the hostages are safely released.

The draft calls for an embargo on the sale and supply of all goods to Iran except for food and medicine and the reduction to a "minimum" of Iran's diplomatic representation in member countries.

In financial areas, the draft would prohibit new credit or loans to Iran, opening of new Iranian bank accounts abroad, and "non-dollar deposits" in banks. While the bulk of the detailed resolution is strongly worded, it falls short of mandating foreclosure on any overdue Iranian loans, calling only on members to "act in a business-like fashion" on loan payments.

Goods transported by Iranian carriers would be barred.

The two-day delay between Monday's Soviet veto and tonight's vote was a result initially of the unwillingness of any Third World council member individually to propose it.

This morning, the Philippines received a go-ahead from Manila and was joined by Mexico. An additional delay came while council members favoring the action privately polled many of the General Assembly's 152 members to assure the necessary two-thirds majority for assembly passage of an anti-Soviet resolution on Afghanistan in that body.

Uniting for Peace originally was adopted under U.S. sponsorship during the Korean War in 1950. It was designed to circumvent a killing veto by one of the council's five permanent members when a council majority decides there is a "threat to peace, breach of peace or act of aggression."

When the General Assembly is not in regular session, the U.N. Charter provides for special sessions within 15 days on request of any member and approval by a simple majority. But Uniting for Peace is the only avenue for both circumventing a veto and calling an "emergency" session.

Although the veto circumvention was most recently used during the India-Pakistan War in 1971, the General Assembly at that time was holding its regular session and there was no need for the "emergency" provision.

Since its adoption, the dual aspect of the provision has been used only four times -- always during deep international crisis, and always by the West to get around a Soviet veto.

Some council members in favor of condemning the Soviets initially resisted using the provision this time, on grounds that the General Assembly has stronger powers in this type of crisis than the Security Council. Once the issue is turned over to the assembly, that body is specifically authorized, if necessary, to gather "armed forces which could be used collectively."

Of more serious concern, however, is a feeling that the U.N. balance of power has altered significantly since the last time the provision was used to circumvent a council veto. Some of the Western allies fear that on issues of widespread Third World agreement in which the West is in the minority, such as condemnation of Israel and a Palestinian homeland and Southern Africa, the Third World conceivably could turn Uniting for Peace against the West.

But at tonight's council meeting, it was the Soviets who found themselves the object of Third World ire.Speaking in favor of the resolution, sponsors Mexico and the Philippines repeatedly emphasized that it was the will "of the nonaligned members."