President Reagan and his director of communications, Patrick J. Buchanan, complained angrily yesterday that ABC News had erred in allowing a Soviet commentator a seven-minute response to the president's nationally televised speech on defense spending Wednesday night.

"I don't know why the hell the media is so willing to lend support to the Soviets," Reagan told a bipartisan congressional leadership meeting at the White House.

Buchanan sent a letter to Roone Arledge, president of ABC News, saying White House officials were "astonished" that the network had given "a trained propagandist for the Soviet Union" equal standing with the president and House Majority Leader James C. Wright Jr. (Tex.), who gave the Democratic response to Reagan's speech.

This, Buchanan said, gave Vladimir Posner, a commentator for Radio Moscow, "a standing he does not merit, a legitimacy he does not deserve."

ABC, after what one source described as an "anxious discussion" of the issue by network executives, issued a statement by senior vice president Richard C. Wald, saying, "Reluctantly, I tend to agree that Vladimir Posner was allowed too much scope on our program last night."

Wald said there is "nothing wrong with asking a Soviet spokesman his views of a presidential speech concerning American posture in relation to the Russians . . . . Our production error was in letting him push on at too great length without an opposing voice to point out the errors and the inconsistencies in what he said."

ABC sources said that the phrase "production error" meant that the network came up five minutes short in the space it was allotted to fill before the popular program "Dynasty" began at 9 p.m. Reagan's 23-minute address began at 8 p.m.

The space was filled with comments from Posner, who said that Reagan's speech was "very dishonest in many ways" and went on to accuse the president of falsehoods.

Sources said that Arledge, who is in Moscow where ABC News is covering the Soviet 27th Communist Party Congress, did not see the speech or know that Posner had been given an extended rebuttal time. It was 4 a.m. in Moscow when Reagan spoke, and Arledge was asleep.

Reagan's critical comment about media coverage of the Soviets came after Rep. John P. Murtha (D-Pa.) said that ABC should not have allowed Posner to answer the president. But Murtha said he had reservations of his own about Reagan's speech, saying that tax increases would be required to pay for the defense spending increases the president is seeking.

In his letter to Arledge, Buchanan said: " . . . The debate over what America requires -- to defend herself, her allies and friends from the awesome military power of the Soviet Union -- is a debate for Americans to conduct. Soviet propagandists have no legitimate role in that discussion."

Other Republicans quickly joined in assailing ABC. In Nashville, where he was attending a regional meeting of party leaders, Republican National Committee Chairman Frank J. Fahrenkopf Jr. said that it was "insulting to the American people" for ABC to allow Posner to call the president "a liar without really being challenged by questioners . . . ."

On the House floor, conservative Rep. Robert K. Dornan (R-Calif.) called Posner "a disloyal, betraying little Jew who sits there on television claiming that he is somehow or other a newsman. It's an affront to decency and dignity and to Jewish people all around the world."

Dornan said later that the purpose of his House remarks was "to speak against anti-Semitism in the Soviet Union." He added: "My intent was to call him a little turncoat."

Reagan, after his comments during the congressional meeting, was calmer about the ABC coverage later in the day. When a visiting network executive in a private meeting asked the president his views of the incident, he reportedly said, "I think Pat Buchanan responded to that."