The director of animal control, his or her agent, any animal control officer, sheriff, deputy sheriff, peace officer, or other employee of the county under the control and supervision of the aforementioned persons shall have the right to go upon private property within the unincorporated and incorporated areas of the county for the purpose of enforcing the provisions of this chapter provided it is necessary or expedient for such purpose.