India, a country that often turned to the United States for emergency grain shipments to avert famines in the 1960s, today has a 20-million-ton stockpile of food on hand after a series of bumper harvests.

This was one factor cited yesterday by the agricultural director of the World Bank as part of a moderately optimistic report on the global food situation. He also concluded that there is enough "underutilized capacity" in agriculture to feed a planetary population of 6 billion people by the year 2000. The present world population is slightly over 4 billion.

"Certainly if we bend our minds to this [food production task] it can be done," said the director, Montague Yudelman.

Yudelman warned, however, that "it would be wrong to say there's no problem." He said in a report that "the core of the world food problem" involves countries with food deficits, large numbers of malnourished people and inadequate foreign exchange reserves to pay for imports on commercial terms.

In 1975, these countries only had to purchase about 12 million tons of grain in commercial world markets. Much of the rest of their food deficits was covered with foreign loans or food aid. But by 1990, as the food deficits of there countries increase they will need to buy 70 to 80 million tons commercially. This volume will be beyond their ability to pay.

Yudelman said that the World Bank's strategy has changed dramatically in response to this situation. Since 1974, the institution has drastically increased credits to small farmers around the world. Agricultural and rural development loans for the fiscal year ending June 30 will exceed $3.3 billion, almost four times the amount of 1974.

Yudelman said that the World Bank had rejected assumptions carried over from "colonial thinking."

"We are finding out in reality that food production requires more and more capital and that low-cost means of agricultural production are very difficult to find," he said. Long-range irrigation requirements alone exceed $100 billion, he said.

Although grain prices have declined substantially from their peaks of 1974, they are still double what they were at the end of the 1960s, and there are wide regional variations in food production.

World bank experts attribute recent Indian successes to government policies that encouraged farmers, good weather, expansion of irrigation, and introduction of high-yielding wheat varieties. The country has had more difficulty increasing its output of rice, which is the major grain crop.

The Indian gains were cited as one reason for a buildup of world grain stocks. The world now has 20 percent of its annual grain needs on hand as reserve stocks, compared with 12 percent three years ago. About half of this surplus is in the United States.

Yudelman noted that the world has an enormous "reserve" in the form of vast acreages now utilized for growing crops to feed animals instead of people. About 450 million tons of all grain (one-third of the amount grown annually) is now fed to livestock, poultry and farm animals. Soviet and American livestock alone consume about one bushel of grain out of every six grown on the earth.