The Reagan administration agreed today to allow the Soviet Union to buy up to 9 million metric tons of additional U.S. wheat and corn whose export had been blocked by the American embargo on grain sales to Russia after its invasion of Afghanistan.

The agreement, after two days of talks between American and Soviet officials here at the Soviet trade mission was described by U.S. Undersecretary of Agriculture Seeley G. Lodwick as "an important first step in normalizing grain trade with the Soviet Union" following President Reagan's lifting the embargo April 24.

Before the embargo was imposed, Soviet grain import needs were estimated at 35 million metric tons because of poor past harvests, and U.S. officials had said they expected sales totaling 25 million tons of grain to the Soviets under the 1975 U.S.-Soviet grain agreement -- 8 million metric tons of guaranteed sales according to the agreement plus an additional 17 million tons requiring special authorization. When the Soviets invaded Afghanistan in December 1979, the commitment to sell 8 million tons was respected but President Carter prohibited the larger amount of additional sales.

Officials have said the Soviets successfully overcame the embargo, which had the official backing of the European Common Market countries, Canada and Australia, by buying what they needed from Argentina and numerous small exporting countries. One of the reasons for the administration's decision to lift the embargo was pressure from U.S. farm interests. Secretary of Agriculture John Block lobbied within administration councils for the resumption of larger exports.

Now, with better harvests expected this year in both the United States and the Soviet Union, in addition to good wheat and corn crops in other principal producing nations, the Soviets are believed to be in a better bargaining position, with American farmers anxious to sell.

The Soviet Union May 26 concluded an agreement with Canada to buy 25 million tons of grain over the next five years and is negotiating with Argentina for new grain purchases.

In what Lodwick described in a statement today as "cordial and frank" discussions here, the two countries agreed that the Soviets could buy an additional 3 million tons of wheat and 3 million tons of corn "without additional consultations" before the five-year grain sales agreement ends Sept. 30.

Meanwhile, the two governments will consult on when and where to hold "early talks to explore a new arrangement for U.S.-U.S.S.R. trade in grains," Lodwick said, and the Soviets could buy up to an additional 3 million tons of grain for delivery after Sept. 30 "in reasonable quantities on the same basis as other buyers so as not to disturb markets."

The Soviet negotiators, headed by Deputy Trade Minister Boris Gordeev, made no comment on the talks. American officials here refused to comment beyond Lodwick's formal statement.