It's probably a tapeworm, which comes out in segments and can look like multiple worms or like pieces of dried rice.
The vet will want a stool sample to confirm. There are a couple different meds that the vet has to take care of the problem easily.
I think it can be passed to humans, but it would be difficult. You would have to eat something that I'm pretty you won't eat.

Dogs get the tapeworm from eating an infected flea.
My Max had a tapeworm. We did not have fleas, so he must have picked it up outside eating something. Here is my thread about it:
http://www.yorkietalk.com/forums/yor...tapeworms.html