Yes, coffee grounds can be harmful to pets, especially in large doses. It is important to use coffee grounds in thin layers and monitor pets to avoid any potential dangers. If you have dogs or cats roaming in your yard, it is advisable to avoid using coffee grounds as a squirrel deterrent.