Poland's military ruler, Gen. Wojciech Jaruzelski, today promised the release of "a large number" of political prisoners in an apparent effort to sweeten yesterday's dissolution of the independent Solidarity trade union.

The promise to release many of the people still interned under the 10-month-old state of martial law came during a speech at the end of a two-day session of the Sejm, Poland's legislature, which yesterday passed legislation sharply restricting trade unions. Jaruzelski also announced a government reshuffle involving the replacement of two deputy premiers and four ministers.

Speaking before the announcement of fresh U.S. trade sanctions against Poland by President Reagan, the premier denounced what he called Western interference in Poland's internal affairs.

There was little visible public reaction to the banning of Solidarity. Workers interviewed outside factories in Warsaw expressed disapproval, but said they were unsure of how to respond.

In Washington, the AFL-CIO said that by dissolving Solidarity, "the Polish government has laid bare its intention of depriving Poland's workers of any voice in the nation's economic and political life." Union president Lane Kirkland called the action "a blatant violation of the International Labor Organization's Convention 87, guaranteeing freedom of association," and said the AFL-CIO "will demand an accounting by the Polish government at the ILO and in every international labor forum in which we participate."

Jaruzelski acknowledged that many Poles have strong feelings about Solidarity. But he said this applies as well to the members of Communist-dominated trade unions, which also have lost their legal status as a result of the new bill.

"The law creates an equal chance for all," Jaruzelski said.

He said street demonstrations by Solidarity supporters could delay lifting martial law by the end of the year, but have not made this impossible. He added: "We will limit the practice of interning people, and release a large number of internees."

The government press spokesman, Jerzy Urban, said an announcement on the release of political prisoners would be made soon. He refused to give details of the number still held, but unofficial estimates put the figure at around 1,000.

Any mass release during the coming weeks is not expected to involve Solidarity leader Lech Walesa or his colleagues on the union's decision-making national commission. In addition, several thousand Solidarity activists are under arrest or serving prison sentences for organizing strikes or distributing leaflets.

Jaruzelski told the Sejm that it should be possible to announce the date of a planned visit to Poland next year by Pope John Paul II, after a meeting between himself and the Polish primate, Warsaw Archbishop Jozef Glemp. A meeting scheduled between the two last week was called off by Glemp to show his disapproval of the government's plan to dissolve Solidarity.

The government reshuffle announced by Jaruzelski appeared to be aimed at streamlining Poland's cumbersome economic administration. Both the deputy premier responsible for planning, Zbigniew Madej, and the finance minister, Marian Krzak, lost their posts. The authority of the deputy premier in charge of the economy, Janusz Obodowski, was strengthened.