Romanian President Nicolae Ceausescu warned the United States today that Western sanctions against Poland could harm chances of easing martial law and repression in that country.

During 4 1/2 hours of talks with Secretary of State Alexander M. Haig Jr., Ceausescu, the most politically independent of Warsaw Pact country leaders, also expressed concern that continuing tensions over Poland could also damage such important East-West initiatives as efforts to limit nuclear missiles in Europe and to broaden the scope of the 1975 Helsinki accords.

Ceausescu's views appeared, in most important respects, to run directly counter to the Reagan administration's tough approach of attacking the Soviet Union and Polish authorities rhetorically and seeking to penalize them for the crackdown in Poland.

However, Haig, speaking at a news conference, sought to play down the differences as "tactical" and insisted that the two governments are in broad agreement on long-range goals including, in the case of Poland, "normalization and ending the state of siege."

Still, it was evident from Haig's responses that the Romanian view of what constitutes "normalization" is much closer to Moscow's insistence on the supremacy of the Communist Party in Poland than the West's call for dialogue and diversity in determining Poland's future.

After his overnight visit here, Haig flew back to Washington, ending a six-day trip that also took him to Spain, Portugal and Morocco.

Haig, who came here in response to an urgent request from Ceausescu, put his emphasis on reassuring Romania that the United States will continue its policy of "differentiation" between the Soviet Union and the other Communist Bloc nations in the Soviet-led Warsaw Pact.

Ceausescu, who maintains warm political and economic ties with the United States and who frequently departs from Soviet positions in foreign policy, while maintaining orthodox Communist rule at home, is the outstanding example of the practical application of this policy.

One senior U.S. official accompanying Haig described Romania as "more truly nonaligned than a Warsaw Pact participant."

Haig said: "Romania's views are longstanding and well-known. It is a nation that, ever mindful of its geography, has courageously sought to assert its independence and its sovereignty. We welcome that."

But, while Haig promised continued close ties with Romania, his responses at the news conference made clear that there is a big gulf between how the two countries view the immediate problem of Poland and its potential effects on East-West relations.

Ceausescu is understood to be especially concerned that a continued Western hard line toward the Polish situation might drive the Soviet Union to demand greater orthodoxy and loyalty from all Warsaw Pact governments, a development that could bring Romania under intensified pressure to curb its independent ways.

Asked whether Ceausescu had raised such a concern, Haig replied elliptically that he did "not discount" that idea. However, he quickly added: "I do not want to leave the impression it was specifically raised by our hosts here."

He also said that, in objecting to Western sanctions, Ceausescu had confined himself to talking about measures against Poland and did not specifically mention measures against the Soviet Union. On the question of Soviet complicity in the Polish crackdown, Haig acknowledged that the discussion had been "a one-side" affair in which he detailed U.S. views about Soviet responsibility for the military takeover.

Haig also said Ceausescu had expressed concern that continued East-West tensions could lead to irreversible setbacks in initiatives that Romania considers important to its freedom of action.

In particular, the Romanian leader is concerned about a breakdown in the U.S.-Soviet talks on limiting medium-range missiles in Europe. Last fall, Ceausescu called for withdrawal of Soviet missiles from Eastern Europe as well as a halt to the planned deployment of new U.S. missiles in the western half of the continent.

He also is worried that the tensions will lead to discontinuing efforts at broadening the Helsinki accords, which Romania regards as a safeguard for its independent course, and building on that agreement through new initiatives such as a European disarmament conference.

While attending the Madrid follow-up conference on Helsinki Tuesday, Haig made clear that the United States will not permit further discussion of such ideas while repression in Poland continues. He reiterated that position today.

Although he insisted that "both President Ceausescu and President Reagan believe it is important that normal conditions be established in Poland," Haig repeatedly acknowledged that there is a big difference in what that means to the two governments.

Despite his flexible approach to foreign relations, Ceausescu maintains very strict control over every facet of Romania's internal affairs and is decidedly unsympathetic to developments such as the popular demand for independent labor unions, which led to the crisis in Poland.

The State Department's first worldwide report on human rights published last week noted that Romania in general been receptive to concerns expressed about its human rights practices. Nevertheless, the report noted, prisoners are sometimes beaten and subjected to psychological pressures. It also said that conditions in jails are poor, diets inadequate, medical care minimal and working hours long. Moreover, the report said that "police harassment is a common feature of everyday life for those who are politically active . . . ."

Before the imposition of martial law in Poland, Ceausescu had spoken out against outside interference in that country's affairs. Since then, Romania has followed a policy of saying as little as possible about Poland, but, when forced to address the issue, the Romanians have made clear their preference to a return to the situation that prevailed before the Polish reform movement began.

Haig also said he and Ceausescu had discussed at length ways to ease the severe financial difficulties Romania faces because of its inability to make the large payments coming due on $11.4 billion owed to European and American banks.

Haig did not elaborate. However, a group of the major banks involved have been working toward an agreement to give Romania more time to make the payments, and U.S. officials are known to feel that Romania's financial problems are less serious than those that brought Poland to the edge of bankruptcy.

A senior U.S. official traveling with Haig said later that, while there are limits to the help the United States can provide, ignoring Romania's financial difficulties could have the effect of driving it back into greater dependency on the Soviet Union.

In that respect, Haig is understood to have assured Ceausescu that Romania will be exempted from any U.S. moves to penalize the Warsaw Pact countries over Poland by denying them access to American high-technology exports.