WHO CAN STEP into Robert S. McNamara's shoes as president of the World Bank when McNamara retires next year at age 65?

Ideally, it would be someone as passionately committed as McNamara to solving the problems of the poor nations and young enough to serve two complete five-year terms -- in other words through the decade of the 1980s.

Traditionally, the post goes to an American, while a European (presently it is Jacques de Larosiere of France) heads the bank's sister organization, the International Monetary Fund.

McNara won't talk publicly about his successor, but as he tells friends: "It's a helluva good job if you're excited by the prospects of it. Although I have had moments of frustration -- they didn't occur too often -- I would have paid to have the job."

A name that keeps recurring in the search already under way at the White House is that of former secretary of State Cyrus Vance, 63. Because of his age, he probably would not be McNamara's first choice. But Vance has instant worldwide recognition, and there would be no question that the establishment-connected lawyer would maintain the tripple-A bond rating enjoyed by the bank. And Vance has the right commitment to, and understanding of, the Third World's problems.

Treasury Secretary G. William Miller would have to be considered by Carter (and would have a role himself in the selection process if Carter is reelected). But Miller is not top-rated in financial markets, nor in the Third World community.

OTHER NAMES on the back of a White House envelope include Peter Peterson, former secretary of Commerce in the Nixon administration, now an investment banker. He was one of the dedicated members of the Brandt Commission that worked two years on a series of recommendations to improve the structure of aid for the Third World. Another is Nicholas deB. Katzenbach, a former attorney general and currently a top IBM laywer.

Federal Reserve Board Chairman Paul A. Volcker would be a popular choice among many bank officials. Carter sides also have mulled over this possibility, but think it better that Volcker stay at the Federal Reserve Board.

Other significant possibilities include A. W. Clausen of the Bank of America, who once turned down a Carter offer of the Treasury post; Henry Kaufman, a New York economist who has earned the financial world's respect through his uncannily accurate forecasting; Bruce MacLaury, president of the Brookings Institution; and Anthony Solomon, now president of the New York Federal Reserve Bank.

Should Ronald Reagan be elected president, it is likely that he would nominate one of two former Republican Treasury secretaries, George Shultz, now a vice president of the Bechtel Corp., or William E. Simon.

But the European countries that will have a significant say is who is chosen to be head of the World Bank have not forgotten Simon's bitter fight against expansion of the institution's lending power four years ago. Given a President Reagan, both rich and poor countries would doubtless prefer almost anybody over Simon.

There might, in a Reagan presidency, be more of a push for a non-American, and in that case two names are prominently mentioned. First, there is Roy Jenkins, who retires next January as president of the Common Market Commission. Then there is former British prime minister Edward Heath, who also was a member of the Brandt Commission.

Even in the present Carter White House, there are some officials who are high on Jenkins. But the reality is that with congressional reluctance to vote money for the development banks and international institutions, the process would be even tougher with a "foreigner" running the bank.

PERHAPS THE KEY qualification for the presidency of the World Bank in the 1980s is devotion to Third World problems, which are growing more intractable daily.

High prices for oil have shoved some countries to the very edge of bankruptcy. Kaufman said, "This is like an economic time bomb ticking away in the international monetary system, and nobody has ever tried to stop the clock."

For the bank, the challenges of the 1980s will be enormous. The mere entry of the People's Republic of China with its one billion people means that the bank's leading responsibilities to the Third World will be increasing by 40 percent. And in the past 18 months, the price of oil has jumped 137 percent -- or 80 percent in real terms.

This is the problem that the World Bank, the rich nations, the poor nations, and especially OPEC, will have to live with for the next decade. Whoever takes over McNamara's bank will be at the very center of the maelstrom trying to keep the time bomb from going off.