Yes, except a pre-fabricated swimming pool accessory to a Group R, Division 3 Occupancy in which the pool walls are entirely above ground, the capacity does not exceed 5,000 gallons, and is less than 24 inches deep.
However, whether or not you are exempt from a permit, you would need to comply with the setback and zoning requirements associated with the parcel upon which it is to be constructed. Please contact the Planning Division at 805-237-3970 to obtain this information.