It sounds like you are talking about tapeworms.

Tapeworms are caused by ingesting a flea with the parasite.

First thing, remove all feces from the yard immediately. To find so many worms in his stool means he has been infested with them for a while. It is rare to see tapeworms in stool. Which could also be why he is so skinny.

You most certainly need to bring him, and Kiki, to the vets so they both can get dewormed. Kiki can easily get them from him.

My oldest, Simba, has tapeworms last year. I had to deworm all three of them just to be on the safe side.