Interior Secretary Donald Hodel's decision last month to continue a ban on most oil and gas drilling off the California coast until the year 2000 is being attacked by another member of President Reagan's Cabinet.

"Locking up our energy resources for 15 years does not lead to our nation's long-term energy security and strength," Energy Secretary John S. Herrington told a meeting of the 15,000-member Independent Petroleum Association of America in Dallas on Wednesday. A copy of his speech was made available here yesterday.

Hodel, who until February held Herrington's job, announced on July 16 a preliminary agreement with some members of California's congressional delegation to continue a one-year moratorium on all but 150 of 6,460 tracts off California's coast until the year 2000.

The agreement has been widely attacked by oil and natural gas producers and most Republican members of the California congressional delegation as a hindrance to reducing dependence on imported oil.

Joining that chorus, Herrington called the vast oil deposits believed to be located off California's coast "the remaining bright spot" amid predictions that the nation's recoverable oil reserves will start declining within the next five years.

"This agreement will limit further development of these offshore resources and is not in the best interest of America's energy future," he said. "We cannot continue to lock up our oil and gas resources. America needs this oil . . . ."

Herrington complained that 900 of the 6,310 tracts that "would be locked up" are high-potential areas while the 150 to be released for drilling are "of very questionable value."