Ignoring pleas from the government, Poland's largest independent union federation, Solidarity, approved a resolution today demanding a five-day work week to take effect immediately. The action set the stage for a new union-government confrontation, possibly this weekend.

At the same time, Poland's state-run media attacked Solidarity, condemning takeovers of government buildings and for the first time linking the number two Solidarity leader with antisocialist forces.

Trybuna Ludy, the Communist Party newspaper, spoke of signs of anarchy in the country and criticized Andrzej Gwiazda, a senior leader of Solidarity, quoting him as calling for full democracy and a multiparty political system in Poland in an interview with a Western newspaper. It was the first time observers could recall Trybuna Luda critcizing a member of Solidarity's presidium by name.

Yesterday the hard-line Army daily Soldier of Freedom said the communist system could not tolerate a political opposition.

The government, seeking a solution to the nation's grave economic problems, says the country cannot yet afford a 40-hour week with no reduction in pay. It has offered workers two Saturdays off each month, or all Saturdays free with an extra half hour added to weekday work shifts.

Members of Solidarity, which claims to represent 10 million Polish workers, said the union's presidium in Gdansk ratified the resolution to reduce the work week by one day without salary reductions or increased work loads on other days.

The plan would take effect this Saturday, Solidarity sources said Workers at the Ursis tractor factory outside Warsaw, who have staged several protests to press past demands, already announced that they would not show up for work on Saturday.

Deputy Premier Mieczyslaw Jagielsi said on television that the government was standing by its counterproposals.

"Not everyone was unanimous in this complicated matter," Jagielski said. "However, taking into account all factual arguments, a close study of the possibilities and the economic aspects basic for every citizen, the government expects that its decision will meet with understanding on the part of the crews and trade unions."

Jagielski negotiated the agreements that ended the wave of strikes that crippled Poland's economy last summer. Solidarity says the Gdansk strike settlement on Aug. 31 promised a five-day work with no extension of the working day.

Meanwhile, workers occupying a government building in Ustryzinki Dolne, 10 miles from the Soviet border, refused to negotiate with a government delegation sent to hear their grievances, saying the delegation did not have sufficient authority.

About 70 workers and farmers took over the building Dec. 29 to press demands including investigation of local corruption and a halt to alleged harassment of Solidarity activists.