The Carter administration, as part of its post-Afghanistan policy of restricting Soviet trade, has canceled a U.S. firm's license to build a large plant for the Russians to produce oil well drilling bits -- a plant the company says is almost complete.

Administration officials said the license, granted to Dresser Industries of Dallas in 1978 after considerable controversy, was canceled last Friday. The cancellation took place despite the fact that John James, chairman of Dresser, wrote Commerce Secretary Philip Klutznick Nov. 25 contending that the plant is essentially complete. "The sole effect" of revoking the license now, James said, would be "substantial loss to Dresser" while "the Soviet Union would be only modestly inconvenienced."

However, administration officials, who asked not to be identified, said they believe the license cancellation will delay Soviet use of the plant two years or more.

These officials also conceded that the decision made at what one called "the highest levels of government," came after an intense interagency struggle similar to the one that surrounded the original issuance of the license. As in 1978, they said, the National Security Council staff and the Defense Department opposed allowing Dresser to proceed, while the State Department argued against revocation.

Complicating the situation this time, however, was the fact that the administration last month approved a license for Caterpillar Tractor Co. to sell the Soviet Union up to $1 billion in equipment for laying a natural gas pipeline from Siberia to Western Europe.

Administration officials insisted yesterday that while the two actions may seem contradictory, they fall into different categories of policy concerning sales of technology to Russia.

The policy derives in part from the furor touched off by the original Dresser deal. At the time, opponents of the $144 million sale charged that it was harmful to U.S. interests because it would give the Soviet Union access to sophisticated drilling technology vital to its oil and gas development.

The upshot was legislation requiring that future high-technology sale not be approved without careful consideration of the foreign policy implications. After the Soviet invasion of Afghanistan last December and President Carter's decision to punish Moscow by restricting its access to American technology, the Dresser license was suspended for review.

Though Dresser could not carry out the remaining parts of its contract during the suspension, company officials said yesterday that almost everything required to construct the plant had already been transferred to the Soviets. All that remained for Dresser to do, the officials said, was to complete some minor start-up corrections on the plant and and train the Russian personnel who will be employed there.

Despite these contentions, administration officials said the revocation decision was based on a determination that the Dresser project involves high-level technology of the sort barred by Carter's post-Afghanistan policy guidelines on exports to the Soviet Union.

By contrast, the officials continued, the Caterpillar deal was approved because it does not involve such sophisticated technology and the equipment could be obtained by the Soviets from other sources. In addition, the officials conceded, the Caterpillar deal is important to America's West European allies, particularly West Germany, which eventually expects to receive up to a third of its natural gas from Siberia.