The House yesterday overwhelmingly approved legislation designed to reduce the growing environmental hazard posed by the widespread dumping of plastic garbage in oceans.

Passed 386 to 14, the measure could lead to an outright prohibition on the dumping of plastic by U.S. vessels throughout the world and a similar ban on dumping by all vessels within 200 miles of the United States.

Even if passed by the Senate and signed into law by the president, it would not go into effect until a year after the Senate ratifies a separate international convention regulating the ocean dumping of plastic. The Reagan administration backs the bill.

Supporters of the measure hailed it as an important first step in curtailing what Rep. Gerry E. Studds (D-Mass.) calls the "mindless" practice of ocean dumping of plastic products.

"It is ubiquitous, it is ugly and it is deadly," Studds said.

Environmentalists estimate that more than 1 million pounds of plastic garbage are indiscriminately dumped into the seas every year, creating a lethal hazard for birds and marine mammals. Plastic products, many of which will not degrade in the ocean for hundreds of years, are said to kill as many as 1 million seabirds and 100,000 marine mammals a year by clogging their digestive tracts or by ensaring them.

The legislation would implement a section of the International Convention for the Prevention of Pollution from Ships that prohibits vessels from signatory nations from dumping plastic anywhere in the world's oceans and from dumping other garbage within 12 miles of land.

That international agreement would become effective one year after at least 25 nations representing 50 percent of the world's shipping tonnage ratify it. The United States accounts for about 4 percent of world shipping tonnage, and since nations with 46 percent of the tonnage have signed the agreement, ratification by the United States would put it into effect. The convention has cleared the Senate Foreign Relations Committee and is awaiting consideration by the full Senate.

Under the terms of the legislation that passed the House, however, the U.S. Navy, which generates a significant amount of the plastic dumped at sea, would have up to five years to comply.

"This bill will eliminate or significantly reduce one of the major sources of plastic pollution," said Suzanne Iudicello, coauthor of a study of the issue conducted by the Center for Environmental Education. "Flagrant violators will probably be prosecuted."

The legislation would direct the Department of Transportation to ensure that the nation's ports and shipping terminals have adequate facilities for collecting plastic garbage and would require ships to maintain records of their refuse disposal.

Violations of the act would be punishable by fines of up to $25,000.

The bill also would require the Environmental Protection Agency to study ways to keep plastic materials from entering the oceans from land-based sources, including the feasibility of banning the production of some products.

The legislation, Studds said, "enacts into law what should be common sense. . . . It represents a constructive, common-sense approach to a major environmental and esthetic problem."