Camallanus worms, paging u/adcas
Treat your betta with Levamisole, you should treat everything else in the tank.
Parasitic poop but not camellanus (camellanus looks like red worms are hanging from the anus, because that's exactly what happens.)
This looks like a job for Praziquantel, treated every three days (most people only recommend two treatments, but I like to be REALLY thorough and go for the whole three treatments.) He doesn't need to eat it, it doesn't kill your cycle or inverts, and it stays in the water column for the three days you're not treating.
You'll need to treat again in two weeks to kill off anything that survived the first treatment, and then I'd do a prophylactic treatment every six months from here onward.
A subreddit for all things related to our colorful finned friends.