The 146 member countries of UNESCO today passed by acclamation a compromise declaration on the news media that avoided any suggestion of the rights of government to control press freedom.

Ambassador John E. Reinhardt, the chief U.S. delegate, hailed the result of two years of complicated negotiations as "a triumph of good will" and "of common sense".

"We see no lingering hint of state control" in the declaration, said Reinhardt. He added that, "except for the form," it bears no resemblance to a draft text originally sponsored in September by UNESCO Director General Amadou Mahtar Mbow.

That text called in Soviet-sponsored language for governments to see to it that the news media do nothing to further racism or propaganda for war.

The press and democratic governments in the West united to condemn this approach as an open invitation to governments to curb press freedom and control newsgathering.

William Attwood, a member of the U.S. delegation and the former publisher of the Long Island newspaper Newsday, said today's result prevented a Soviet takeover of UNESCO that would have followed congressional pressure on the U.S. government to leave the organization.

During the negotiations on the media declaration the United States never actually threatened to suspend its participation in the United Nations Educational, Scientific and Cultural Organization. But the Americans, who contribute 25 percent of UNESCOE's regular budget, only recently paid up three years in back dues which the U.S. Congress withheld after the U.N. organization adopted an Arab-backed resolution calling Zionism a form of racism. Moral Support to Journalists

Although there was general agreement among Western journalists at the conference that what was left unsaid in the UNESCO declaration was more important than what was actually said, there were passages that give moral support to journalists in their efforts to obtain access to news.

One provision reads, "Access by the public to information should bee guaranteed by the diversity of sources and means of information available to it, thus enabling each individual to check the accuracy of facts and to appraise events objectively. To this end, journalists must have freedom to report and the fullest possible facilities of access to information."

Another provision calls for journalists "in their own country or abroad" to be "assure of protection guaranteeing them the best conditions for the exercise of their profession."

The compromise nature of the text was stressed by Mbow. Its adoption was a major personal victory for him after the original text threatened to blow his organization apart.

Many officials expressed the private view that his role in today's unanimity opens the road for the former education minister of Senegal to make a serious bid to succeed U.N. Secretary General Kurt Waldheim. Unanimous Approval

Unanimous adoption by Consensus was moved by Tunisia, which had led the nonaligned Third World group of nations that was seeking condemnation of the Western monopoly of the international media. it was seconded by Poland, which represented the Soviet bloc. Thunderous applause signified the text's unanimous adoption.

But echoes of the debate that has rage for weeks here came in afterward in speeches in which delegates expressed the reservations behind their acceptance of the declaration.

On the Western side, the Swiss and Dutch expressed the gravest reservations. Members, of the U.S. delegation said that Reinhardt had not wanted to voice any criticisms after the vote so as not to ruin the climate of agreement. They said he planned to note American reservations in a press conference. When he appeared before reporters, however, he resisted all efforts to get him to express anything but satisfaction.

George Beebe, chairman of the World Press Freedom Committee made up of 32 major Western publishers and professional groups, said, however, that the press would have to be "vigilant" to prevent "abuse or misinterpretation" of the declaration.

Some Western editors and publishers say it was a mistake for the West to take part in any UNESCO media negotiations at all. Reinhardt stressed the view, which prevailed in the U.S. government, that the choice was not between a bad declaration and nothing, but between negotiating for an acceptable declaration or letting an unacceptable be adopted be default. 'This Declaration is Unforceable'

Reinhardt said he doubted that the declaration adopted today would make any practical difference in the work of the press in the world but that if something like the original had been adopted, "then governments would have been able to explain and justify their acts by referring to an unacceptable text." The New World Information Order

The Third World nations had pressed hard for a call for what they had labeled "The New World Information Order," making clear that they were seeking among other things, the replacement of major Western news agencies as the main sources of international reporting.

This demand was largely blunted by a U.S. offer of broad technical cooperation to help developing nations set up regional news agencies, train journalists and contribute broadcasting and printing facilities.

A number of Third World delegates expressed pleased surprise at the willingness shown by the United States in particularly to admit that they had a case for wanting more and better media of their own to escape domination of the news columns and air waves by the media of the industrialized world.

Western officials said they had no illusions that the issue is buried. The West faces a major challenge to its domination of international radio frequencies when the International Telecommunications Union meets in Geneva in October 1979 to reallocate the world's radio frequencies. Some analysts note that the Soviet Union may find itself sharing a common interest with the West in resisting Third World demands that it give up a large portion of the broadcast frequencies it now controls.

Reinhardt, who heads the U.S. International Communication Agency, the parent body of the Voice of America, admitted that the UNESCO declaration "concedes a point to the Third WOrld when it comes to access to the world's means of communications." But, he insisted, it was a point that the United States had been willing to concede for some time.