The world has substantial oil refining capacity, but much of it cannot be used to produce the oil products -- gasoline, heating oil, and diesel and jet fuel -- most in demand, Rene G. Ortiz, secretary general of the Organization of Petroleum Exporting Countries, said yesterday.

That is one reason OPEC member nations plan to get into the refinery business in a big way. Ortiz told the meeting of the American Petroleum Refiners Association here.

While the available crude oils are becoming heavier, "The pattern of demand in the major consuming markets since 1960 has shown a steady increase in the share of the lighter ends of the barrel," he said.

"This divergent evolution of the supply-and-demand pattern would logically necessitate a change in refinery configuration to adapt to the new circumstances," Ortiz continued. Refinery configuration refers to the relative ability of a refinery to make lighter products from heavier crudes.

"However, it is surprising to note that the refinery configuration has not been substantially adapted to cater to such developments, and the necessary conversion units are not yet being installed at the pace required," he said.

Ortiz' audience, all of whom own or operate refineries that can process no more than 40,000 barrels or less of crude oil daily, are acutely aware of this problem. Some of them can produce no gasoline at all, and for most of them, a significant part of their output is heavy fuel oil for industrial and utility boilers. Heavy fuel oil is in substantial oversupply in the United States and most of the rest of the world.

The situation is so critical that privately some APRA members admit a fair number of small refiners probably will be forced out of business by next year or in 1982 once price controls on domestic crude oil are lifted. Small refiners have been deliberately and heavily subsidized under the provisions of the oil pricing egulations intended to equalize crude oil costs among refiners. Once controls are gone so will be the subsidy, which is paid by larger refiners -- and indirectly by oil consumers generally.

Ortiz was referring to this sort of refining capacity when he declared, "It seems that neither investors nor planners in the developed world care much about this overcapacity or the likelihood of its continuation in the near future. It is known that even in Western Europe -- which is said to have the largest surplus capacity in the developed world -- new refining plants are coming on stream and plans for further capacity are being drawn up.

However, at this meeting members of the APRA displayed great concern. The APRA agreed yesterday on the broad outlines of a request it will make soon to Congress for tax relief of some type to help provide small refiners with enough cash to upgrade their plants to produce lighter products. APRA officials hope such provisions could be included in a bill on domestic refinery policy pending in Congress.

The association will make no effort to retain the direct subsidy in present regulations, which is known as the small refinery bias, according to APRA President Larry Steenberg.

Ortiz said a number of OPEC nations could build refineries to produce products for export and be competitive in world markets even though construction in most OPEC countries is very costly.

"The fact that environmental constraints and regulations affecting new refineries are generally much less stringent in our member countries, coupled with the advantages of lower wages and cheap labor, make such projects less costly than in many industrialized oil-importing countries," he claimed.

"I can only emphasize that OPEC is firmly set on the road of progression from the relative simple technological role of a raw-material producer to a more complex one as a processor of these raw materials," the OPEC official said.

Ortiz attacked tariff and nontariff barriers erected by oil-importing nations against refined products, which he described as a hindrance to these OPEC plans.

Some of the small refiners would like to erect such tariff and nontariff barriers in the United States to protect the domestic industry. Currently the United States imports only very small quantities of gasoline, heating oil and other lighter products. However, large quantities of residual fuel oil are imported from Venezuelan and Caribbean refineries to the East Coast.

Last week President Carter extended for six months the suspension of a 63-cent-a-barrel import fee on gasoline and a 21-cent-a-barrel fee on crude oil.