The dumping of about two million gallons of waste oil into the metropolitan region's sewers, backyards, land fill areas and even toilets is posing a serious environmental hazard, but local and state governments in the area appear divided on how to deal with the problem.

Next week Maryland will become the first state in the union to have a law requiring that motorists who change their own automobile oil take it to newly designated recycling centers. The law, which Acting Gov. Blair E. Lee is expected to sign Tuesday, imposes stiff fines of up to $1,000 or 60 days in jail or both.

Officials in Northern Virginia, however, have dealt with the problem on a voluntary basis.

Last summer Fairfax County became the first Washington area jurisdiction to institute a voluntary oil recycling program similar to its paper, metal, and glass recycling projects. Arlington County has had a similar program in effect for two months and the Alexandria City Council was scheduled to consider a proposal last night to set up a voluntary waste oil recycling system at its meeting.

Gasoline stations have special tanks to store the used oil, which they sell to private companies for prices ranging from 6 to 12 cents a gallon. The oil can be cleaned and used again or it can be converted into fuel. Officials say that since the advent of the self-service gasoline stations, more people are changing their own car oil, thereby aggravating the dumping problem.

Maryland officials and others said, yesterday that their experience shows that voluntary programs simply do not work. "The problem with volunteer programs simply do not work.

"The problem with volunteer programs is that they're ineffective and they work so poorly that it's not worth spending time on them," remarked Victor Rasheed, executive director of the Greater Washington and Maryland Service Station Association.

Dumping oil into trash cans, land fills and other places is already illegal in Washington area jurisdictions. The new programs, whether voluntary or mandatory, are an attempt to make it easier for the consumer to comply with the law.

Fairfax and Arlington county officials said yesterday that it was still too early to measure the effectiveness of their programs. About 300 gasoline stations are participating in the Fairfax program, according to Ronald B. Mallard, the director of the county's Department of Consumer Affairs. In Arlington, 52 stations are participating, but H. S. Hulme Jr., director of the Arlington Department of Public Works, says the program started slowly and that the county is still attempting to inform the public of the service.

Alexandria officials say 13 of the city's 36 gasoline stations have agreed to participate in a voluntary program, and they think more will join. The gasoline stations will serve as depositories for oil changed by motorists.

Bruce Bereano, administrative assistant to Maryland Senate President Steny H. Hoyer who drafted the bill which becomes effective July 1, said a 1976 state study showed that 26 million gallons of automobile oils and other lubricants were sold in Maryland, but that only 8 million gallons were recycled.