Good choices include carrots, cucumber, watercress, greens, squash, and fennel. Pineapple is also a good choice. Its full of bromelain, an enzyme that digests proteins. It can also boost your dogs immune system to help him fight off the worms. Papaya also contains an enzyme, called papain, that can help combat worms.