WASHINGTON (AP) _ Whether the issue is the gradual warming of the earth or the world population increase, a new study finds that the key to major environmental improvements is held by a just a handful of countries.

Illustrating the point, the fourth annual ''State of the World'' volume published by the Washington-based Worldwatch Institute said Brazil, Indonesia and Zaire contain 48 percent of the world's tropical forests.

Those forests could store enough carbon to influence the ''greenhouse effect,'' the warming of the earth caused by carbon dioxide and other gases from industrial activity.

''Unfortunately, Brazil and Indonesia are both pursuing national resettlement programs that will reduce the remaining rain forest area, and Zaire has shown little leadership'' in forest management, the report said.

One of the authors, Edward C. Wolf, said at a briefing for reporters, ''None of those three has acknowledged their role as stewards in the carbon cycle.''

The same point could be made in regard to the source of the buildup of carbon dioxide, the report by the environmental research organization said.

Fossil fuels burning is the source of most of the carbon dioxide, and Worldwatch noted that the Soviet Union, China and the United States account for half of emissions and two-thirds of world coal reserves.

''The energy policies of these three countries really loom very large in the world's climatic future,'' Wolf said.

The industrial countries are responsible for emissions of chlorofluorocarbon chemicals that threaten the earth's ozone layer and production curbs ''should not be unmanageable,'' the report said.

Major producing countries are meeting under the auspices of the United Nations Environment Program to consider an international agreement to limit chlorofluorocarbon production, and Wolf said that conference appeared to be ''a step ahead of other conferences.''

''For some of the major adjustments facing humanity, a relatively small number of countries hold the key to success,'' Worldwatch researchers wrote.

In population growth, the report said, India and China accounted for 35 percent of world population increase in 1986; Nigeria and Egypt accounted for a quarter of the births in Africa; Mexico and Brazil more than half of Latin American births.

Even though those countries dominate the numbers, several are vulnerable to environmental, economic and social disaster because they cannot reduce population growth.

The slow-growth regions are Europe, where 12 countries now have completed the transition and have essentially stable populations; the Soviet Union; North America, Australia and New Zealand and East Asia, including China and Japan. Annual growth rates in all these areas are 1.0 percent or less and all are heading toward stability.

In the rest of the world, growth rates average 2.5 percent per year, ranging from 2.2 percent in Southeast Asia to 2.8 percent in Africa.

''Many of the countries with rapid population growth have declining incomes, whereas almost all those with minimal or zero population growth are experiencing income rises,'' the report said.

Without new land to plow, raising food production by modern seeds, fertilizers, irrigation and equipment ''is not easy. It thus comes as no surprise that per capita grain production is declining is some 40 developing countries.''

''When this happens in an agrarian society, it is usually only a matter of time until it translates into a decline in per capita income, and into the need for food imports'' and growing debt to pay for them.

Central America shows what can happen:

''Even before the first oil price shock (in 1973), deforestation and soil erosion had been accelerating, slowly undermining Central America's agricultural foundation. In effect, population growth began to overwhelm the ecosystems, the educational systems and the employment-creating capacities of the national economies. ... In El Salvador, where incomes of the richest one- fifth of the population are 33 times those of the poorest one fifth, social tensions eventually burst into civil war.''