There is a sort of mucus lining that that can sometimes come out in your stools. It’s common in people who have bowel disorders and with certain types of infection, but it can happen to anyone occasionally.
There’s always a little mucus in your stool all the time, it’s just usually too small to notice.