The dog had to have an emergency operation and now the owner is warning other dog walkers to be vigilant