WARSAW, Poland (AP) _ The resignation of an entire Cabinet for the first time in postwar Poland raises the possibility that more non-communists - even opposition figures - will be brought into government, parliament deputies say.

The Sejm, or parliament, voted 359-1 with 17 abstentions Monday to accept the resignation of Prime Minister Zbigniew Messner and all 19 ministers in his government, which had been sharply criticized for its handling of the economy.

In free-wheeling debate that preceded the vote, one deputy suggested inviting opposition members into whatever governing team is named. Another urged reinstatement of the outlawed Solidarity free trade union movement.

Inflation that has reached 60 percent helped provoke a wave of labor unrest in the spring and a second round of strikes last month that ended when communist authorities agreed to talks with the opposition that may include the issue of legalizing Solidarity.

Scheduled for next month, the talks are to focus on the solving country's daunting economic and social problems.

The current Cabinet is to remain in place until the Sejm names a new government, which it is expected to do later in the month.

''We are looking for someone who is competent, someone who has imagination and charisma,'' said Alfred Miodowicz, a member of the communist party's ruling Politburo and leader of the official trade union federation OPZZ.

In Poland, the communist party holds ultimate power, appoints the government and mandates policy.

Krystyna Jandy-Jendroska, chairwoman of a Sejm committee that criticized the economic performance of Messner's government, said in her report to parliament that more ''coalition forces'' from outside the party should be brought into government, including experts on the economy.

Polish United Workers (communist) Party deputy Ryszard Lukasiewicz, a Warsaw journalist, urged a system of ''socialist parliamentary democracy''.

''Different social groups, including the opposition, must assume participation within the authorities,'' he said. ''It would mean significant changes in the model of the party's leadership (and) working out a model of a ruling coalition.''

The comments appeared in line with statements from authorities in recent months that the government should broaden its base of support.

Fifteen of the resigning government's 19 ministers are communists, two have no party affiliation, and there is one minister each from the communist-allied Peasant Party and Democratic Party.

The topic of Solidarity and its chairman Lech Walesa came up several times in the discussion that followed Messner's announcement of the resignations.

Solidarity ''should regain its proper place in the trade union movement,'' said Ryszard Bender, an independent parliament member from Lublin. It was the first call in parliament for legalizing Solidarity since the movement was suppressed with a 1981 military crackdown.

Addressing Polish leader Gen. Wojciech Jaruzelski, Bender said Jaruzelski and Walesa, ''the first Nobel Peace Prize laureate in Polish history,'' should meet and make a joint statement concerning Poland's ''most vital interests.''

Jaruzelski smiled slightly but did not otherwise react.

In all, about 30 deputies spoke, with several endorsing the planned broad- based talks that are to include the opposition.

At least speaker suggested the government was being used as a whipping boy.

''The situation resembles a soccer game,'' said Tomasz Adamczuk, a Peasant Party member. ''The players are the political parties, the Polish trade union alliance, the opposition and others,'' he said. ''The ball is the government.''