The Kremlin has lodged an official complaint with the Polish authorities over what it describes as a dangerous rise of anti-Sovietism aimed at wrenching Poland from the Soviet Bloc, the official Polish news agency PAP reported tonight.

In a report distributed first by its Russian-language service, PAP said Soviet Ambassador Boris Aristov had met Polish leaders to demand action to halt the alleged anti-Soviet drive. The protest was called "an official statement of the Soviet Communist Party Central Committee."

The harsh tone of the protest recalled a letter sent by the Soviet leadership to the Polish Communist Party in June, demanding action to curb the threat of alleged counterrevolution in Poland. The latest protest coincides with a new offensive by Poland's communist leaders against the independent trade union federation Solidarity.

After a delay of several hours, PAP also reported the protest in its Polish-language service, and it was broadcast over Polish radio, news services reported early Friday. PAP also did not make clear exactly when Aristov delivered the protest to Polish party leader Stanislaw Kania and Premier Wojciech Jaruzelski.

The last time Kania is known to have met with Aristov was at the end of last week, following the first stage of Solidarity's national congress in Gdansk. The ambassador is believed to have expressed Soviet concern then at resolutions passed at the congress including a message of support to independent trade unionists elsewhere in Eastern Europe.

According to PAP's version of the Soviet statement, Aristov told the Polish leaders at their latest meeting that "the wave of anti-Sovietism in Poland has reached dangerous limits." The Soviet statement continued: "Facts show that an acute and unbridled campaign against the Soviet Union and its foreign and domestic policy is being waged in Poland openly and that it is being unpunished. These are not isolated, irresponsible sallies but the coordinated action of the enemies of socialism, with a precisely determined political aim.

"Their aim is to blacken and slander the first socialist state in the world and the very idea of socialism, . . . to break the bonds of fraternal friendship linking our peoples and as a result to wrench Poland from the socialist community and to liquidate socialism in Poland."

Soviet and Polish official statements on the crisis have failed to specify what action is to be taken against Solidarity. But at a government meeting tonight, officials reportedly discussed "definite measures . . . for the defense of socialism in Poland."

Perhaps the most ominous part of the Kremlin protest was its contention that the anti-Soviet campaign is going unpunished. The Soviet note reportedly charged that anti-Sovietism is penetrating every sphere of Poland's social life, including ideology, culture, and the educational system.

In its statement, the Polish government accused Solidarity of jeopardizing Poland's existence. The session was called to discuss ways of implementing demands by the party's Politburo for a sterner line toward the 9.5 million-member union movement.

Earlier today, Solidarity replied to a sharply worded attack from the Communist Party by insisting that it would seek to avoid an all-out confrontation with the authorities, but rejecting the party's criticism as displaying "a lack of realism."

A Solidarity statement said the union would not back down on its demands for worker control of factories and the economy, and for what the union called genuine self-government.

A statement issued by Solidarity's press spokesman, Janusz Onyszkiewicz, in the name of the union's national coordinating committee, rejected accusations that Solidarity is seeking to take over power in Poland. It described labor agreements signed between the government and striking workers last summer as the basis of peace, order, and national security in Poland.

Solidarity's plans for economic reform were defended by Onyszkiewicz, who said that the union is attempting to suggest constructive actions to stem "the progressive ruin of the economy."

Political analysts here believe that Solidarity's leaders face a serious dilemma as they prepare for the second stage of the union's congress at the end of next week. Either Solidarity accepts what amounts to a challenge by the party for a major trial of strength, with dangerous and unpredictable consequences for the nation, or it allows its forward momentum to be broken.

Much has changed in Poland since last March, when Solidarity was able to force the government to back down after the union threatened a general strike over the issue of police violence in the northern city of Bydgoszcz. Seven months of growing economic hardship have created a mood of public frustration that coincides with a polarization of political opinions among both Communist Party and Solidarity activists.

During the past year, Solidarity has relied on two main weapons: strikes, and massive public support. The party leadership now appears to believe that, as a result of the deepening economic crisis, both of these weapons have been blunted.

Whether this confidence is justified can only be tested by another confrontation. But in recent weeks, even some Solidarity officials have spoken of differences of opinion within the union.

For the party, it is an open question as to what extent its leaders can count on the active support of the country's 3 million Communist Party members. In the Bydgoszcz crisis, a revolt by party members undercut the hard-liners in the leadership and forced the compromise with Solidarity.

This time, however, party leaders appear united and have taken greater care to mobilize support. Provincial party chiefs met today in Warsaw to consider the new strategy, as did the Cabinet.