When Japanese Prime Minister Yasuhiro Nakasone calls the seven-nation economic summit to order here on Sunday, he will have a double agenda: to defend his country's position in world trade against critics abroad and build acclaim for himself at home that will help extend him in office after his present term expires this fall.

That is the view of many Japanese analysts as the summit approaches, and both tasks could prove to be tall orders. In the past 12 months, Japan has drawn harsh condemnation from abroad for huge trade surpluses that have continued ballooning despite a series of measures meant to open its markets to foreign goods and a dramatic drop in the value of the dollar, which makes Japanese products more expensive overseas.

It has reached the point that some Japanese worry that the summit will become a 6-against-1 gang-up.

Suggestions that Nakasone stay in office beyond the four-year limit of the ruling Liberal Democratic Party also have his rivals up in arms. No amount of goodwill from a successful summit, it is argued, could deter other aspirants for the job, which -- before Nakasone -- had been changing hands every two years.

Nakasone has issued vague denials that he has such plans. But many people here read his refusal to be firm as confirmation that he sees the summit not as a final turn in the spotlight but as a means of building support to stay there.

Since taking office in 1982, he has made internationalism a theme of his government. Nakasone calls President Reagan and the five other world leaders coming here "very good friends of mine." There is no doubt he considers playing host to them at a time of growing prosperity in the world economy as one of the greatest honors of his tenure.

He told foreign journalists recently that he hopes to play the role of umpire at the three-day meeting. Asked if he was worried that there would be cries of "Kill the umpire!" Nakasone smiled and said he planned to come to the field wearing plenty of padding.

His chief protection will be arguments that Japan already is doing everything possible to control its mammoth trade surpluses -- by Japanese figures a record $62 billion in the year that ended March 31 -- and if everyone will only be patient through 1986, they will begin to recede.

In the past year, Japan has cut tariffs on 1,800 items, simplified import standards and implemented an "action program" of reforms aimed at making the Japanese market more open to foreign goods. They will help Japanese overcome traditional prejudice against foreign products, it is said.

The government is now mulling a longer-term program intended to transform its economy into one less dependent for impetus on exports and more on domestic buying power. Nakasone has pledged his best effort, but resistance is surfacing among industries and groups that would suffer.

More important for cutting the surpluses, however, is the 30 percent drop that has been registered in the dollar's value against the yen since September due to coordinated intervention in world currency markets by the central banks of Japan, the United States, West Germany, Britain and France. A cheaper dollar tends to make foreign products cheaper to Japanese buyers and Japanese products more expensive to foreigners. This, in turn, reduces trade imbalances.

To U.S. demands that Japan speed up its economy to draw in more imports, Japan will say it already is doing so. However, by most projections, the effects will be small. That is because the government is unwilling to use in a big way the most effective means of pump-priming -- government spending -- due to a long-standing objective of reducing a national budget deficit that proportionately is larger than the United States'.

Some Japanese officials preparing for the summit contend their country's efforts -- some would say sacrifices -- finally are being recognized abroad and "Japan bashing" will find no significant players here next week. In addition, they say that Reagan, while tough at times in bilateral negotiations, would shield his friend Nakasone in a group. "The United States has always been very kind not to isolate Japan this way," says Bunroku Yoshino, chairman of the Institute for International Economic Studies.

Japan is likely to play a moderating role in what could be the main political issue of the conference, Libya and terrorism. Japan alone among the seven countries has taken no definitive stand on last month's U.S. air strikes on Libya. Nor has it applied economic sanctions or moved to restrict Libyans in Japan.

Japanese officials argue that Libya's presence here (65 people) is too small and the country too far away to arouse concern. But Japan's generally timid foreign policy is especially so in the Middle East, out of fears of upsetting the region from which it gets 70 percent of its oil.

The Soviet nuclear reactor disaster, another certain subject at the summit, has also drawn a comparatively mild response here. Nakasone has been quoted as saying the Soviet government's release of information has been "insufficient" but the Foreign Ministry has avoided any criticism.

Analysts here generally agree that if the public and party elders get a feeling that the summit was a "success," Nakasone's own political stock will be greatly increased.

A common scenario here holds that following further sympathetic exposure with the visit of Charles and Diana, the prince and princess of Wales, who arrive here for a visit two days after the summit's close, Nakasone will dissolve the Lower House of the Diet, or parliament, and hold new elections at the same time as previously scheduled ones for the Upper House. If the Liberal Democrats win new seats, and Nakasone's public approval ratings remain high (they are now at 60 percent, highly unusual for a Japanese prime minister) the pieces might be in place for Nakasone to make a move this fall.

The bylaws of the ruling party limit a party president (who by tradition automatically becomes prime minister) to two two-year terms. But there is talk of changing those rules for Nakasone or putting through a sort of extraordinary extension that the rules already allow.

It is a long shot by all accounts. His rivals are trying to tar him as a man too quick to dance to the foreigners' tune. But Nakasone is an unusual man in Japanese politics, given to doing things his own way. Though some members of his group say he plans to step down, Nakasone himself seems to draw pleasure from being vague about it.