Cuban President Fidel Castro bitterly attacked the Reagan administration today for "openly threatening to impose on Cuba a military blockade and to find other ways to wipe it off the Latin American map."

The defiant remarks were Cuba's first public response to the charges leveled by the new U.S. administration that Havana is sending arms to leftist guerrillas in El Salvador. In a puzzling twist, the text of his speech distributed tonight stopped short of the outright denial of U.S. charges that a ranking Soviet spokesman had attributed to the Cuban leader in briefing journalists earlier in the day.

Vadim Zagladin, deputy spokesman for the Soviet party, said Castro, in his speech before the Soviet Communist Party Congress, had ridiculed Washington's claim that it has evidence that Cuba was shipping arms to El Salvador as "senseless."

There are no [Cuban] ships in the area delivering arms," Zagladin quoted Castro as saying. "No one can catch them because they are nonexistent."

The absence of Castro's reported denial in the unofficial text of his speech distributed here could be explained by his habit of departing from any official text. It quoted him as vowing to fight "to the death" against any U.S. aggression and denounced alleged Western attempts to "destabilize" Poland. Polish leader Sanislaw Kania, who spoke after Castro, said that a "serious political struggle is under way" in his country but that his government was "strong enough" to prevent counterrevolution.

[In Washington, a text of Castro's speech made available by the Cuban Interests Section also did not include the statements Zagladin attributed to Castro.]

Castro said in an October 1979 interview that it was Cuba's duty "sometimes" to help "liberation movements" in the Carribean area but he emphatically denied charges that he was sending arms to El Salvador. He "reserved" comment on any future aid to Salvadoran guerrillas and said "I decline to respond to that" when asked if Salvadoran leftists were receiving training in Cuba.

The State Department yesterday made public documents that it said prove that the Soviet Union, Cuba, and other communist countries are supplying arms to the insurgent forces seeking to topple El Salvador's conservative government.

Tass quoted Castro as saying "the Yankee imperialists are now trying to discredit national liberation movements by branding them the work of terrorists. By such lies they finally discard the fig leaf of human rights and once again act as world gendarmes."

Zagladin quoted Castro as saying a U.S. arms blockade would be only one aspect of planned American aggression against Cuba. "They are trying to find other ways to wipe us off the face of the map," he reportedly said."We will fight for each piece of our territory, to the death, in case imperialism attacks us. We will not resist the symbol of liberty if it is offered to us, but we will not retreat [in the face] of aggression."

Castro accused Washington of "threatening the patriots of Salvador and hatching aggressive schemes against that country. The U.S. is supporting or propping up the most corrupt dictatorships on our continent to establish brutal domination and Cuba will not be brought to its knees."

The congress is closed to all but a handful of Soviet and communist journalists.

The Cuban leader, head of the non-aligned movement who has not been able to stem dissatisfaction with Moscow among those countries over its invasion of Afghanistan, was the first foreign delegate to address the congress, which is called every five years to approve the ruling Politburo's foreign policy and domestic economic guidelines. Castro staunchly backed the Soviets and hailed them as leaders of world anti-imperialist forces.

Castro, whose dispatch of Cuban troops to aid Soviet-backed forces in Angola and Ethiopia helped put bilateral detente in the deep freeze, asserted that Washington's denunciations of Central American liberation movements is "an attempt to prove that events [there] are not the result of the peoples' just indignation over long oppression, but allegedly a consequence of international conspiracies.

"At the same time, the imperialists interfere with the revolutionary people of Nicaragua and are trying to intimidate them. They [thus] display their aim -- establish a regime of the toughest dominance over the entire hemisphere."

The Polish Communist Party leader, according to the briefing by Zagladin, said the Warsaw authorities are faced by subversionists who "are trying to put the new trade union in opposition to the party, trying to maintain tension, cause anarchy, and destabilize life. We are determined to do everything possible to put an end to such actions."

While making clear that Warsaw accepts the Brezhnev doctrine of Soviet military intervention to maintain Communists in power in the Warsaw Pack, Kania also made clear he will do everything possible to help resolve the Polish crisis by political means.

"We thank the Soviets for understanding the situation and for their confidence that Poland will be able to solve its problems independently," he said, bringing applause in the Palace of Congress, according to Zagladin.

He pledged that Poland will remain a staunch member of the Warsaw Pact and Comecon, the Soviet Bloc economic group.