The introduction of your finger into your
anus causes the the prolapse of the anal
skin and parts of the anal mucous membrane.
After removing your finger, the prolapsed
mucous membrane can be expelled. This is
likely what is going on.
There are other reasons for mucous to be
present in stools but because you are
stimulating yourself, it is more likely
the irritation~~