AS POPULAR as William Donald Schaefer has always been in his beloved Baltimore and now all around the state, the critics' rap on him has been that he tends to be stubborn, blindly probusiness and not all that responsive to environmental concerns. But as he has just demonstrated in Annapolis, he can enjoy a good surprise now and then, doesn't mind poking fun at himself -- and can change his position on an issue for the better. To the surprise and satisfaction of environmental groups, Mr. Schaefer has endorsed legislation banning oil and gas drilling in the Chesapeake Bay and its tributaries. That's a big help for a good bill.

The governor also said he personally favored a permanent ban on the use of phosphate detergents, another top issue for the environmental groups. Maryland (as well as the District of Columbia and Virginia) has banned the phosphate detergents, but Maryland's prohibition is scheduled to end Dec. 1, 1989. When Mr. Schaefer was mayor of Baltimore, he opposed the ban. Why the switch?

"I've become enlightened," he said. Whatever else that statement may or may not bode for his future concern, the governor's support for these measures comes just as he, along with governors of surrounding states, the D.C. mayor and federal officials, has signed a long-range agreement to clean up the bay. Mr. Schaefer noted that it would be inconsistent with the objectives of the bay agreement to allow drilling and the possibility of an oil spill.

Del. Brian Frosh (D-Montgomery), chief sponsor of the bill, notes that the worry of supporters in the legislature is that it would take only one drilling accident "to set back all of our previous efforts" by many years. That's precisely the danger -- and the Chesapeake Bay should not be endangered any more than it is already. With Gov. Schaefer's "enlightened" backing, legislators can and should enact these protections of the bay this year, while they're still focused on the rescue of this unique and important natural resource.