Warning that high and rising prices for oil threaten the economic stability of the Third World, Robert S. McNamara, president of the World Bank, yesterday called for a five-year, $25 billion bank lending program to help poor countries develop additional energy sources of their own, including crude oil.

In a detailed report called "Energy in the Developing Countries," McNamara said the bank is exploring the possibility of a separate lending facility, affiliated with the bank, that would devote itself entirely to financing energy projects in the Third World. w

A $25 billion lending program would be nearly double the $13 billion in loans already blueprinted over the next five years by the organization, and would represent a vast step-up from the initial oil-exploration ventures undertaken by the bank, beginning in 1977.

The impetus for a significant expansion in the World Bank's oil exploration and development activities, and for creation of a possible new affiliate, came from a communique on the subject issued by the seven major powers that met at the Economic Summit in Venice last June.

The $25 billion lending program would cover oil and gas, coal, electric power and renewable energy sources such as firewood and alcohol, resulting in projects valued at about $92 billion. Additional financing would be expected to come largely from private capital encouraged by the bank's participation.

McNamara said the total investment needed for an expanded energy program in the oil-importing countries over the next decade would run from $450 billion to $500 billion.

"The financing of such a program will make heavy demands on domestic savings and external capital, including assistance from the World Bank," he said.

A table in the report shows that the bulk of such investment monies would be for electric power, including nuclear development. Compared to $18.5 billion being invested in total power projects in 1980, the annual average for the 1981-90 period would jump to $33.6 billion, according to the report.

The average investment in oil and gas would rise from $3.6 billion this year to $6.3 billion in the same period.

At a news conference called to explain the bank's energy-lending program, Vice President Ernest Stern said that "we wouldn't be proposing such a large expanison if we didn't consider there were sound investment opportunities in the less-developed countries."

Several developing countries -- including Barbados, Brazil, Chile, Colombia, Ghana, Guatemala, India, Morocco, Pakistan, the Yugoslavia -- already are in the process of becoming oil producers. And, according to the report, oil has been discovered in five oil-importing countries are not producers at present: Benin, Chad, Niger, the ivory Coast and the Sudan.

Moreover, Brazil, Chile, Pakistan, Turkey and Argentina -- countries that formerly turned aside or severely limited the activities of private oil companies -- now are seeking their help.

The report says that of 18 petroleum projects being financed by the bank in 16 countries, "the estimated economic rate of return is high, varying from 30 percent to well over 50 percent." Half of these are production projects, and half involve predevelopment activities, such as exploratory drilling, surveys or technical assistance.

Although McNamara stressed that many of the details of the bank's proposal are still to be defined, he made the main objective clear: finding a way to finance energy projects beyond the $13 billion level already budgeted for the next five years.

Stern told reporters that to start a new affiliate, capital subscriptions of $5 million to $7 billion might be needed from among the present backers of the World Bank. Only a small percentage of that capital actually would be paid in: the rest would be callable. The affiliate -- like the bank -- would raise most of its lending money by borrowing in private markets.

The bank said that at present, 20 developing countries are producing oil at the rate of 2 million barrels a day, up from 1.5 million in 1977. Their production can be raised to 2.9 million by 1990, and supplemented by an additional 700,000 barrels from poor countries that are not now producing oil, the bank said. With a "maximum effort," the 3.5 million total thus realized could be boasted to about 4.8 million barrels a day, the bank said.

Combined with energy conservation -- which the bank now feels reversing an earlier position, can be significant in poor countries -- such an increase in local production could cut the Third World's oil import bill by $25 billion to $30 billion, in 1980 dollars, by 1980.

Without such an emphasis on production and conservation, the bank report said in a gloomy assessment, the Third World's oil bill of $50 billion this year will soar to $110 billion (in 1980 dollars) by 1990, exacerbating the increasingly difficult problem of financing huge international debts.

American officials, who would have to go to Congress to ask for additional funds, said in interviews over the weekend that they support the general thrust of McNamara's report, but could not make any commitments until there has been a greater discussion of its details.

The bank's proposal -- and especially the idea of a brand-new affiliate -- will be aired at the forthcoming annual meeting of the World Bank and International Monetary Fund (IMF) in Washington late in September, but no action is possible until some time next year at the earliest.

Stern implied that the bank prefers the affiliate approach to raising new capital for the World Bank itself, because it might be easier to get money from both Western nations and members of the Organization of Petroleum Exporting Countries for lending programs that deal exclusively with energy.

Besides, the World Bank's vice president said, energy has become so important that "it deserves itegrated attention." An affiliate, if organized, would take over existing energy loans of the bank.

Stern brushed aside the prospect that a recent decision of the bank and the International Monetary Fund to deny observer status for the upcoming bank-IMF meeting might discourage OPEC participation in the new venture.

A high U.S. official told The Washington Post that the Venice summit had urged the bank to consider expanding its energy programs, inasmuch as "the multinational companies were not conducting adequate oil explorations in the poor countries because of the political risks involved."

World Bank sources said that the problem was less the political risk than the unavailability until recently of geological studies of the prospects for oil, as well as the negative attitude of some countries toward equity participation for the multinational companies. Both of these factors are changing.

The report says that, until now, the potential for oil development in the majority of those poor countries that import oil has been explored only superficially. Enough is known to have determined that enormous, easily exploitable reserves, are not present.

But not enough research and money have been put into the effort "to establish whether there are smaller deposits that could make an important contribution to their own energy supplies," the report says.

The bank's report said that the cost of all sources of energy -- triggered by a five-fold increase in real oil prices since 1972 -- has made developing countries realize they must cut the burden of imports.

Referring to the "devastating" impact of high oil prices on balance of payments ledgers in poor countries, Stern cited two example:

In 1973, Brazil paid only $750 million for its oil imports, equal to 12 percent of earnings on exports. But in 1980, Brazil is paying $11 billion for oil, which takes fully 50 percent of its earnings on exports.

Similarly, in 1973 India paid $719 million for oil, equal to 22 percent of its export earnings. The bank estimates India's 1980 oil bill at $5 billion, which will take 60 percent of the country's earnings. Recently, the Indian government has placed advertisements in U.S. newspapers seeking private corporations' participation in oil exploration in India. CAPTION: Picture, ROBERT S. McNAMARA ...$25 billion World Bank program