The Coast Guard is investigating whether a large commercial ship set anchor in the wrong location, damaging an oil pipeline and causing a spill that threatens Laguna Beach, Newport Beach and other Orange County coastal cities, an official familiar with the investigation said Monday.