Poland's unprecedented Communist Party congress opened today with a politically charged procedural dispute over how to elect the party leader.

With the congress in closed session, it was still uncertain how a deadlock between rival groups of delegates would be resolved, but it appeared as if supporters of the outgoing party secretary, Stanislaw Kania, had failed in an attempt to ensure his immediate reelection.

The success of such a move would have given Kania, who became party leader shortly after the massive workers' strikes of August 1980, much greater scope for influencing the outcome of the congress. Had he been confirmed in his own position right at the start of the six-day meeting, he would hav enjoyed enormous powers of patronage and leverage for the election of his preferred candidates to the Central Committee and Politburo.

The floor fight underlined the unique nature of the congress which, for the first time in a communist country, was preceded by a free election campaign among Poland's 3 million rank-and-file party members. It also overshadowed Kania's opening address, in which he defended the democratic reforms of the past year, but pledged Poland's continued allegiance to the Soviet Bloc.

In addition to electing a new leadership, the main tasks of the congress are to draft a program designed to lead Poland out of its political and economic crisis and strengthen institutional controls over the party bureaucracy. The congress is being closely watched by Poland's Soviet Bloc neighbors, who have urged the adoption of a tougher attitude to the independent Solidarity trade union.

Despite Soviet misgivings at the pace of reform in Poland, the Kremlin is presented by a member of the Politburo, Viktor Grishin, who conveyed greetings from President Leonid Brezhnev. In an afternoon address, he said the Soviet Union could not "adopt an indifferent stance when the fate of socialism in a fraternal socialist country is at stake."

Attacking the Reagan administration, he said the United States had tried to use the Polish crisis to further its anti-communist global strategy. "World reaction does not hide its designs to weaken Poland as a link in the socialist community and thus undermine the united might of our country," he said.

The fight over procedure erupted even before the formal opening of the congress at midday in the Palace of Culture, a Soviet-style "wedding cake" of a building, to the strains of the Polish national anthem and the communist internationale. In a closed session earlier, the delegates had failed to reach a final decision over how to elect a party leader.

Traditionally in communist countries, the congress elects a Central Committee, which then elects a party first secretary. The Polish congress, however, decided to elect the first secretary directly, but opinion was almost evenly divided over whether this should be done at the beginning or end of the meeting.

The issue is politically signficant, because, as soon as the congress comes into session, all leadership bodies are formally dissolved. By delaying the election of party secretary, the delegates are in effect assuming greater authority themselves and allowing freer rein to the interplay of political forces at the congress.

Offical congress spokesman Wieslaw Bek said a small majority of delegates (about 50) had favored postponing the choice of party secretary until after the election of a new Central Committee. But this vote was itself challenged since, at the time it was taken, about 100 delegates were out of the hall attending special working groups.

The procedural debate had to be broken off inconclusively because of the official opening of the congress and a further discussion was to be held tomorrow morning behind closed doors.

It was unclear whether the wrangle would significantly weaken Kania's chances of eventual reelection as party leader. Many delegates who voted against the proposal for immediate elections are believed to have done so as a matter of principle rather than as a gesture of opposition to Kania, whose centrist policies still command widespread support.

On the other hand, congress sources said a significant minority of delegates believe Kania lacks the vision and imagination to lead the nation out of the crisis, even though they give him credit for not using force against the workers. These delegates would prefer the Gdansk Party chief, Tadeusz Fiszbach, who has strong backing from the Party's reformist wing.

Spokesman Bek said Kania would probably face opposition in his reelection bid, but refused to speculate on who might stand against him. It remains to be seen whether Fiszbach or another rival candidate can succeed in putting together a new coalition among the 1,964 delegates to swing the balance against Kania.

Kania's opening speech, delivered on behalf of the outgoing Central Committee, attracted only moderate applause from the delegates. Repeating past themes, he said Poland had reached the most dramatic point in its 1,000-year history and called for an "alliance of the forces of common sense" in the party, church and Solidarity to overcome the crisis.

He described the alliance with the Soviet Union as "the cornerstone of our policy" and "the guarantee of our independence and future." He also echoed Soviet warnings of the danger of counterrevolution caused by the alleged infiltration of dissident groups into Solidarity.

Kania said the congress, which he first proposed last September, represented a unique chance to strengthen the party's position and restore its ties with the nation.

"Our foreign allies are watching this congress, too, with lively interest in the hope that we can find a program for overcoming the crisis with our own forces," he said.

In another assertion of independence, the delegates voted to expand the agenda to include discussion of an investigation into the responsibility of former leaders for the crisis. The congress will decide whether to take further action against the group led by Edward Gierek that ran Poland from December 1970 to August last year.

A commission headed by Politburo member Tadeusz Grabski reccommended that Gierek and other discredited former leaders be stripped of all high honors, but left open the question of whether they should be put on trial.

The Kremlin signaled a frosty attitude toward the party congress by making no mention of a routine greeting from the Soviet Central Committee to the Polish Party, Washington Post correspondent Dusko Doder reported from Moscow. Such messages invariably are featured on the front page of Pravda.

[Another departure was observed in the use of quotation marks by the official news agency Tass when describing Kania's speech. Tass said Kania addressed the congress with a "program report of the Politburo of the PUWP ]Polish Communist Party[ Central Committee." Normally quotation marks are not used in this context and were seen as an attempt to cast doubts on the report's legitimacy.]