The Soviet Union and Poland, in a communique today at the end of a three-day visit here by Soviet Foreign Minister Andrei Gromyko, indirectly condemned President Reagan's recently expressed view that communism is an aberration and that the Soviet Union is falling apart.

The communique, issued after Gromyko returned to moscow, did not mention Reagan by name. But the president's remarks about the cracks within the Soviet Union's Eastern European empire have caused official concern here, and the joint Soviet-Polish statement can be regarded as an indirect reply.

The statement also indicated that unresolved differences remained between the two sides despite Gromyko's three meetings with the Polish Communist Party leader, Stanislaw Kania, and other members of the ruling Politburo. It said the talks were held in "a fraternal atmosphere," but omitted usual formulas about "full identity of views."

This omission was interpreted to mean that, although the two sides agreed on foreign policy, they still did not concur on domestic Polish issues. The Kremlin has accused the Polish leadership under Kania of "weakness" in dealing with alleged antisocialist forces, and there is nothing in the communique to suggest that this opinion has been revised.

[Washington Post correspondent Kevin Klose reported from Moscow that observers there think it is clear that Gromyko had talked tough and was less than satisfied with the answers he heard from the Poles.]

The communique, in its indirect criticism of the Reagan administration, said that "the supporters of a militaristic line in international affairs" want to hide their attempts to change the world's balance of forces behind a propaganda screen about a "Soviet threat."

"This was an attempt to revise the postwar realities of Europe," it said.

It added that "certain Western circles" seek to take advantage of the Polish crisis to discredit socialism and weaken the Soviet Bloc.

"Poland decisively rejects such speculation," the communique said. "Poland has always been a lasting link in the socialist commonwealth. The defense of the gains of socialism in Poland is inseparable from the problems of independence and the sovereignty of the Polish state."

Gromyko's visit, which came just 10 days before the start of a special Polish Communist Party congress, has provided the Polish leadership with an opportunity to demonstrate full support for the aims fo Soviet foreign policy despite its insistence on the need for reforms at home. But it also has shown the sensitivity of Soviet and Polish leaders to any move that could be construed as attempting to revise the results of World War II.

Polish officials have expressed alarm at what they regard as Western -- primarily American - attempts to use the crisis to score ideological debating points over the Soviets. In the official Polish view, this can only rebound to Poland's disadvantage.

A senior Polish diplomat said privately: "We Slavs are a proud people. Statements like the recent one by President Reagan that communism is crumbling can produce a dangerous psychological effect. There is the temptation to demonstrate to him that it isn't."

Another raw nerve for the Kremlin is any suggestion that the Yalta Treaty that confirmed the postwar division of Europe can be revised. The Soviet-Polish communique mentioned this point:

"The Soviet Union, together with the other socialist countries, will ensure other socialist countries, will ensure that the boundaries of the socialist countries remain unalterable," it said. "This has been confirmed by treaties and agreements after the war."

Gromyko was the first high-ranking Soviet leader to visit Warsaw for talks since Kania survived an attempt to unseat him by Hardliners encouraged by a tough Kremlin letter to the Polish Central Committee.

Other than confirming that Polish leaders briefed Gromyko on preparations for the congress, the communique made no mention of domestic Polish issues. By contrast to previous Soviet-Polish statements, it concentrated almost exclusively on foreign affairs and did not list steps -- which the Kremlin has called for -- to be taken by the Polish authorities against "the enemies of socialism."

While this could be explained by Gromyko's primary interest in foreign policy, he is also a senior member of the Soviet Politburo and it could indicate a disagreement on how to proceed.

As Gromyko was leaving Warsaw, the East German news agency ADN published a commentary accusing the Polish party of showing scant regard for the danger of counterrevolution. It alleged that the leadership of the Polish labor union federation Solidarity had been penetrated by conterrevolutionaries intent on undermining the party.

Meanwhile in Sofia, Bulgaria, a senior official of the Soviet Bloc trading organization Comecon announced that no joint rescue operation would be mounted to help Poland out of its economic crisis. Comecon premiers have just ended an annual session in Sofia dominated by the question of how to adjust to the economic strains caused by the widespread failure of Polish factories to meet contracted delivery targets.

Nikolaj Fadejev, Comecon's secretary general, told a press conference that it would be left to individual member countries to assist Poland. He expressed confidence that the Polish Communists, assisted by "the progressive sections of the population," would be able to overcome the crisis and once again meet Poland's obligations toward its East Bloc trading partners.

Klose reported from Moscow:

While the communique reaffirms Poland's future as a socialist state and asserts that the Warsaw Pact "will take every ligitimate care about security," it is clear that the Soviet foreign minister was less than fully satisfied with the answers he heard from the Poles. The communique lacks any phrases indicating full agreement.

Thus while most of the statement sets forth identical positions on such important Kremlin issues as Afghanistan and arms reduction talks, the crisis that sent Gromyko to Warsaw remains unresolved, namely, Moscow's continuing loss of confidence that Kania has the will to reverse the reformers' tide.