Japanese politicians, especially nationalists, say the final chapter of the country's climb back to legitimacy after defeat cannot be written until the islands are returned. But diplomats have begun reluctantly to conclude that with Russian nationalism flaring anew in Siberia, President Boris N. Yeltsin may find it more difficult to give up the islands than even Mikhail S. Gorbachev did.

The practical effect is that Japan continues to be a reluctant partner in the Western scramble to assemble a package of assistance to help Mr. Yeltsin out of his economic problems. The $24 billion aid package announced 10 days ago by the United States and Germany made Japan decidedly uncomfortable. Japanese diplomats said it was inappropriate to announce the package because all the details had not been worked out, and because a premature announcement might send the wrong signal to the Russians: that they had the money in hand and could ease up on austerity. 'Political Constraints'

Japanese leaders said that although Tokyo would join multilateral efforts to stabilize the ruble, Japan would not increase its own aid beyond what it announced last year after the failed coup against Mr. Gorbachev. "We face political constraints," said Finance Minister Tsutomu Hata.

There has also long been talk here of investing in the exploration of natural gas and oil in eastern Russia or other parts of what was the Soviet Union. But it remains just talk. Japanese industrialists, cautious in normal times, are not about to invest during the current recession in a resource for which there may not be a need until well into the 21st century. They also look to the Government for insurance or guarantees, and Japanese leaders are not ready to cooperate until the territorial issues are resolved.

But Russia is not the only place over which Japan is showing caution. Many people had expected Tokyo to play a role in rebuilding Cambodia. Indeed, Yasushi Akashi, a United Nations diplomat who heads the peacekeeping efforts there, expects his country to pay for at least one-third of the cost of stationing troops. But for now it looks as if Japan will not send its own troops, despite the best efforts of Prime Minister Kiichi Miyazawa. As in the Persian Gulf war last year, Japan will help foot the bill without putting its people on the line.