Lech Walesa, leader of the banned Solidarity trade union, is about to be released from internment and seeks a meeting with Poland's military ruler, Gen. Wojciech Jaruzelski, it was officially announced here today.

The news of Walesa's imminent release was given at a dramatic, hastily convened press conference by the government spokesman, Jerzy Urban. He said the decision was made by the interior minister, Gen. Czeslaw Kiszczak, after Walesa sent a personal letter to Jaruzelski saying that each side had had enough time to assess each other's strength and should seek national reconciliation.

In what appeared to be an example of his puckish sense of humor, the 39-year-old Solidarity leader signed his letter "Corporal Lech Walesa." This is the rank he holds as a reservist in the Polish Army after military service in the early 1960s. He proposed "a serious discussion on subjects of mutual interest" to Jaruzelski and added, "I am sure that with good will we will certainly find solutions."

The announcement came a day after the death of Soviet President Leonid Brezhnev, whose influence has been heavily felt in Poland, but there was no indication the two events were linked.

Walesa's release, which Urban said would take place in the next few days, could have an important psychological impact in Poland. During the past 11 months of military rule, the demand "Free Lech Walesa" has become one of the most persistent slogans voiced by workers in protest strikes and demonstrations.

The timing of the announcement, however, appeared designed to avoid the impression that Walesa's release was in response to popular pressure. The authorities waited until the day after what they described as the failure of a nationwide protest strike called by the Solidarity underground, presumably to show that they were freeing Walesa from a position of strength.

Tonight riot police used the utmost caution in attempting to disperse several thousand Solidarity supporters who had gathered in the center of Warsaw to celebrate the 64th anniversary of Poland regaining independence after World War I. For the first time in many months, the police appeared to be under orders not to use tear gas and water cannons against the demonstrators, who eventually left the area peacefully.

Observers said the restraint shown by the authorities may have been motivated by a desire not to dispel the conciliatory mood created by the decision to release Walesa. Demonstrators chanting "Down with the junta" carried portraits of Walesa and white-and-red Solidarity banners from the old town toward the central Victory Square.

It seemed unlikely that Walesa's release would lead to serious negotiations between him and the martial-law government. Urban insisted that, following Solidarity's legal dissolution last month, Walesa was now merely a private person.

He played down suggestions that there would be an early meeting between Walesa and Jaruzelski by saying that many Polish citizens had sought meetings with the general, who is also prime minister and Communist Party leader.

"Lech Walesa must simply go home and rest. His future is unknown. . . . He will become a free man and can do whatever he chooses," Urban said. He added that no conditions of any sort had been attached to his release.

The Western analysts believe that in freeing Walesa, the government is seeking to create an impression of flexibility without seriously jeopardizing its political control. Several hundred other senior Solidarity activists remain in internment while several thousand people are serving prison sentences for crimes under martial law.

The government seems to be gambling that -- without a legal organization behind him -- what officials have described as "the Walesa myth" will quickly dwindle. It evidently hopes that once the excitement surrounding his release has passed, he will lose his influence.

The Roman Catholic Church has long pressed the government for Walesa's release and it is likely that, despite official denials, the subject came up again during the meeting earlier this week between Jaruzelski and the primate of Poland, Archbishop Jozef Glemp. The meeting ended with a bargain of sorts with the government agreeing to a firm date for a return visit to Poland by Pope John Paul II next June and Glemp calling for social peace.

There were mixed reactions to the government's announcement, which was later reported briefly on radio and television following extensive tributes to Brezhnev. Contacted at her home in Gdansk, Walesa's wife Danuta said, "I'm full of joy and fear because I cannot imagine the crowds of people who will want to see him once he is free."

At the government press center, Urban, smiling and relaxed, read the full text of Walesa's letter, dated Nov. 8, and addressed: "General Jaruzelski, Warsaw." It was sent from Arlamow, the government rest home in a remote corner of southeastern Poland where Walesa has been held since May.

The letter read: "It seems to me that the time has come to explain certain issues and undertake steps to agreement. Time was needed to find out what both sides can do. I propose a meeting and serious discussion of subjects of interest. I am sure that with good will we will certainly find solutions."

The government announcement said: "In connection with Walesa's letter and the proposal included in it, the minister of the interior, Gen. Czeslaw Kiszczak, talked in Arlamow with Lech Walesa. As a result of this conversation, the minister of the interior has asked the provincial commander of police in Gdansk to lift the internment decision on Walesa."

Walesa was taken into custody by police at his home in a suburb of Gdansk in the early morning hours of Dec. 13, 1981, following the imposition of martial law. He was flown to Warsaw and transferred to a villa in the suburb of Otwock where he remained until May.