What kind of bloodworms are they? Not wild caught ,right? If so, it could be a parasite.
They're easily contracted through fresh or tainted frozen bloodworms.
Other than that it just looks like an injury, everybody has given great advice if that's the case.
Could possibly be gill flukes
Heres a description on those...
Gill flukes, small parasites that attack your bettas gills specifically, symptoms can range from reddened, irritated looking gill covers, to open reddened, irritated gill covers, they may try to rub thier infected area on plants.. other symptoms are clamped fins, bleeding from the gills, fungus in gills.. gill flukes are a nasty disgusting way to die... a secondary infection from this can be fungus completely eating away the gill cover and inside the gill, to treat gill flukes use Life Bearer, its best to o.d your fish a bit on this, and its non toxic so you can, if Life Bearer doesn't work, get some Parasite Clear from Jungle.. turn up water temps, and pray.. after your betta recovers treat him with a good fungicide.. like Fungus Clear, Fungus Elimantor, or the age old Eurethomyacin...
And this is the only other info I found...a bacterial infection that attacks the betta ..
I don't know if there is a proper term for the flesh eating betta virus, but i have SEEN it in my fishroom, patches of skin become inflamed, reddened and nasty all around, like a scrape would look on our knee, bettas that died from this have actually been found decapitated.. with no fins, and body pieces floating about.. its really sick, but i found the cure for it in clout, i only saw this in petstore rescues so far..
Do you have any bettamax handy?