If the cloves are removed from the ham, it should be safe for your dog to consume. However, it's important to keep in mind that ham is typically high in sodium and fat, which can be unhealthy for your dog if fed in large amounts. It's always a good idea to consult with a veterinarian before offering new types of foods to your dog.