It sure is a thing, look up Formicophilia. It could be dangerous if you used the wrong bugs, were allergic to their bites and/or stings or didn't take care to clean yourself properly afterwards.
The most common ones used are meal worms, these can be bought easily and cheaply from pet stores as they are used as live food for various reptiles and amphibians. I have also seen common composting earthworms used but here you need to be careful that they are clean, also be aware that they do bite although it is a tiny bite and not really painful.