Poland today served notice that it will try to recover from the United States the billions of dollars in losses suffered under the economic sanctions imposed by the Reagan administration following Warsaw's declaration of martial law in 1981.

Without elaborating on what legal or political action his government has in mind, official spokesman Jerzy Urban, in a lengthy statement on U.S.-Polish relations, accused the Reagan administration of unilaterally severing a bilateral economic agreement dating from the 1970s which, he said, contained a clause disassociating economic cooperation from political conditions.

"At an appropriate moment, Poland will present the United States with a bill of the losses suffered by Poland as a result of the unilateral severance of that agreement, and we will demand an appropriate compensation at a proper time," Urban told reporters.

He put the cost of damages at "several billion dollars." Last month, Vice Premier Janusz Obodowski said western sanctions, particularly those imposed by the United States, had cost Warsaw $6 billion, not counting what the senior official said were additional "rather considerable indirect losses."

In another development, a committee of the Polish parliament today cleared former Communist Party leader Edward Gierek of constitutional responsibility for the country's crisis, and instead recommended that two former top aides--Piotr Jaroszewicz, Gierek's longtime prime minister in the 1970s, and former deputy prime minister Tadeusz Wrzaszczyk--go before a tribunal of state on charges of abuse of power.

The judgment, which is expected to be ratified by the Polish parliament, suggests that Gierek, an ex-miner now age 70 who fell from power with the advent of Solidarity, can live in retirement without risk of official retribution. He has stayed out of public view since he was removed as first secretary in September 1980 ostensibly because of a heart condition.

Gierek's exoneration, which the parliamentary committee stressed was decided on lack of legal and not political grounds, is likely to anger many Poles who regard the onetime leader as personally to blame for Poland's economic ills because he pursued a policy of heavy borrowing to fuel the illusion of prosperity and ignored warnings that catastrophe lay ahead. Also cleared of constitutional responsibility for the Polish crisis were two former deputy prime ministers, Jan Szydlak and Tadeusz Pyka and ex-prime minister Edward Babiuch.

The U.S. sanctions, joined or supported to varying degrees by Washington's European allies, have gone far toward blocking Poland's access to western markets by denying new official credits, suspending favorable tariff treatment, and revoking rights to fish in U.S. waters or land Polish airliners at U.S. airports.

A western diplomat speculated that Poland's statement today could signal an attempt to whittle down Warsaw's sizeable debt to the U.S. government by demanding an offsetting credit for the economic damage done by the sanctions. Talks on rescheduling Poland's $14 billion debt to western governments were frozen by the west after the crushing of the Solidarity independent union movement, though western commercial bankers have concluded new, extended payment terms for some of the $12 billion Poland also owes them.

The Polish warning today came amid indications of a possible rollback of some sanctions and an expected easing in U.S.-Polish relations as the government of Gen. Wojciech Jaruzelski prepares to abolish the formal vestiges of martial law in Poland. Polish officials, however, have been angered by recent Reagan statements still tying elimination of the sanctions to liberalizing moves by the Communist leadership in Warsaw.

"We shall not and cannot take into account the demands made by Reagan, which are not only an interference in our affairs but also insult our national pride and dignity," Urban declared in reiterating his government's familiar position.

With U.S.-Polish relations at their worst since the end of World War II, Urban said Poland would respond to American "gestures", but he stated that "an indispensable condition" for a normalization of ties would be an end to what he termed the "anticommunist crusade" by the U.S.-funded radio stations, Voice of America and Radio Free Europe, which beam Polish-language news to Poland.

He said Poland has no intention of altering the new official trade unions to satisfy western and Polish opposition demands for a more open, competitive labor movement structure. He also dismissed as absurd a report circulating after last month's visit to Poland by Pope John Paul II that new Christian trade unions might be established under the aegis of the country's influential Roman Catholic Church.

He said internal Polish factors, not foreign demands, would determine when martial law is lifted here, and added that if it had not been for "interference from the outside"--meaning the sanctions and anti-Polish western propaganda--martial law could have been lifted earlier.

Pressed on when the government actually plans to end military rule, suspended last December, Urban declined to speculate on a date.

A number of recent official statements have hinted strongly at an announcement on or just before July 22, Poland's national day. The Polish parliament is to meet next week to consider legislation intended to accompany the abolition of the martial-law decree. The new laws are seen by many as effectively minimizing the impact of the formal removal of martial law by legalizing tight press censorship and labor curbs and streamlining Poland's police apparatus.