Treasury Secretary W. Michael Blumenthal used the occasion of a toast in the Great Hall of the People tonight to warn the Chinese government that "even limited invasions risk wider wars and turn public opinion against the transgressor."

Blumenthal, the highest American visitor to come to Peking since normalization of relations between the two countries, is scheduled to open talks Monday on broader trade and commercial relationships. He arrived here yesterday.

But the cloud that hangs over these negotiations because of the Sino-Viet-namese war -- despite American denials that the two are related -- intruded on the formal state dinner welcoming Blumenthal tonight.

The Chinese minister of finance, Chang Ching-fu, in an opening toast, strongly defended China's attack on the "Vietnamese aggressors," who he said "were emboldened by the support of the Soviet Union."

He repeated the weekend declaration of Chinese U.N. Ambassador Chen Chu that China will negotiate anywhere to end the conflict. Chang said China seeks no territory from Vietnam, but wants peace "to build up our country."

"All we want is a peaceful and stable border. After counterattacking the Vietnamese aggressors as they deserve, the Chinese frontier troops will strictly keep to defending the border of their own country," he added.

Blumenthal, speaking in Chinese for the first and routine part of his remarks, briefly outlined the potential economic benefits of normal relations, but added that these could flourish only under conditions of world peace.

"Respect for the independence and the territorial integrity of all nations and reliance on peaceful means to resolve disputes are the fundamental principles of international conduct," Blumenthal said. "Any erosion of these principles harms all nations. Even limited invasions risk wider wars and turn public opinion against the transgressor."

To make sure there is "no doubt" about the American position on this matter, Blumenthal proceded to quote from President Carter's recent speech in Atlanta, in which Carter condemned both the Vietnamese invasion of Cambodia and the Chinese invasion of Vietnam.

[In Moscow, the Soviet Communist Party newspaper Pravda criticized Blumenthal for making his visit now "in spite of the fact that China is waging an aggressive war, trampling underfoot the standards of international law, to say nothing of human rights."]

There was some speculation that Chang beefed up his remarks on the Sino-Vietnamese hostilities to take some sting out of the remarks Blumenthal was to make shortly there-after.

"We knew what was in their toast," said a Chinese official.

But in relation to the trade and economic talks, both sides are trying to play the issue of hostilities low key. Blumenthal, when asked on the flight to Peking if the war would affect the economic talks, said: "I see no reason why they should. I don't believe they are related."

Continued fighting could, nevertheless, add tension. An American source said today that while it is true China probably does not want to hold territory in Vietnam, "the sooner they get out, the more they reduce the danger of the war spreading.

"If they stay another week," he said, the Russians will find it hard not to escalate their effort, first "by adding to the supplies they're giving Hanoi, then by a gradual involvement on the northern border with China."

Outwardly at least, Peking is no different from what it seemed last year and earlier, according to foreigners here now and then. A random sampling of a few English-speaking Chinese in the wall poster area of the capital indicated no apparent concern about the situation.