Former Solidarity chairman Lech Walesa defied his shipyard bosses today by beginning an unauthorized holiday so he could be on the job next month for the anniversary of the strikes that led to the formation of the independent trade union he once led.

A spokesman for the Walesa household in Gdansk said that the former union chief, his wife and three daughters had gone on a two-week vacation after authorities at the Lenin Shipyard where Walesa works refused to grant him holiday time now or in September. Under Polish labor regulations, the action could cost Walesa his job.

"They told him he could take his holiday in August, but for obvious reasons he turned down the offer," the spokesman said.

August marks the third anniversary of the 1980 strikes in the northern seacost shipyards and the Silesian mines that were ended by worker-government accords laying the basis for the creation of the now-banned Solidarity union. The month is expected to be a pivotal period for Poland as it emerges from the military-run repression of the past year and a half.

Following the visit last month by Pope John Paul II, Polish authorities have hinted at abolishing martial law before the end of this month. But government officials have also been saying privately that rolling back military rule is a complex process that will require accompanying legislation--tightening the labor code, press censorship rules and changes in government structures--that could take some time to enact.

The advantage for the government in stretching out this transitional phase would be to confront the Solidarity underground and other political opponents with the threat of new repressive measures, or further delays in easing current ones, should an attempt be made to turn the August anniversaries into protests. The second anniversary last Aug. 31 of the signing of the 1980 accords saw the fiercest street clashes under martial law, resulting in five deaths and hundreds of injuries.

In a bit of political theater geared to the upcoming anniversaries, Polish leader Gen. Wojciech Jaruzelski traveled to Walesa's hometown of Gdansk yesterday where he told a youth rally that his government still adheres basically to the 1980 agreements.

"Some people suggest we are not fulfilling them," he said. "No, we are true to the socialist essence of these agreements, but we understand them as agreements reached with the working class, as agreements of the healthy current of life and not of adventurist, anarchistic, counterrevolutionary froth."

Jaruzelski has repeatedly claimed since imposing martial law in December 1981 that the workers' strikes that erupted three years ago were justified and the agreements signed afterward--promising self-governing unions for workers and farmers, less censorship of the press, new freedoms for the Roman Catholic Church and other liberalizing measures--would be respected. He maintains that Solidarity leaders abrogated the accords by threatening to overthrow the socialist system in Poland.

But John Paul II, on his visit here last month, called into question the government's commitment to the celebrated agreements and appealed to Poland's Communist authorities to put into effect genuine social reforms based on them.

Walesa, by going on a vacation that the authorities did not want him to take now, once again has thrust himself into the news. In addition to an act of political pique, this may be the former union leader's way of demonstrating that he has no intention of retiring to the political sidelines, contrary to speculation after his meeting with the pope that he was being shunted aside to facilitate some kind of church-state accommodation.

Walesa is aware that he could be dismissed from his job for the unauthorized leave, his spokesman said, but is ready to defend the action on appeal to senior Polish officials or in court.

Polish officials may decide to ignore the infraction to minimize publicity for Walesa, a national celebrity and Solidarity symbol who is regarded by the government as a private citizen with no political role.