It shall be unlawful for anyone to knowingly abandon or to aid in the abandonment of any animal. An animal relinquished through written agreement with the marshal's office, licensed rescue group, licensed shelter, licensed veterinarians, individual, or other entity shall not be deemed abandoned but shall be considered relinquished to the respective entity.