A vet has warned that people should be careful about the items they discard in public, after a dog needed treatment.