I'm pretty sure it's tapeworm. If you have a good vet ( who cares about your cat more than money), you can put the worm - it's actually only a segment - and take it to the vet. I have done that. My vet gave me a drop thing. I applied it like flea drop, and it's effective right away.
That worm is caused by cat eating fleas. So it's important to do routine flea treatment. If you only see one or two worm segment, my vet says she wouldn't even bother treating, because the cat probably only ate one flea. Once the cat finishes discharging the worm, it'll not propagate. Having said that, I always treat all three cats when I see one worm discharge just for peace of mind.
No big deal really.
If you are in the SF Bay Area, I recommend Nine Life Clinic in Redwood City. The doctor is like a cat whisper. No non-sense either.