If you say that when you feel, the anus will be locked and you need the small intestine above the anus to feel whether it is gas or feces, you can try to retract it. If it feels like a lump, it should be fart. If it feels a little wooden, it should be shit.
When defecating in the intestine, you will feel that wood is not so flexible and will not hurt. If you fart, you will shrink your anus, and you will feel pain in your stomach and abdomen after a long exercise.