It looks like a tumor, either benign or malignant or it could be a cyst. If it's a malignant tumor there is nothing you can do. Cysts sometimes go away on their own. It could be internal parasites too. Does it look like a worm hanging out of him? Have you been feeding him green pea treats at least once a week and being careful not to overfeed. Constipation can cause bloating and pressure on internal organs and eventually bacterial disease. I would begin treating with a combination of Maracyn and Maracyn-Two (two different antibiotics covering gram positive and gram negative bacteria.) They can be used together. It may help bring his appetite back. You should feed small portions of green pea ,frozen not canned and microwaved or defrosted with skin removed. Cut VERY small pieces and get him to eat 3 small pieces twice a day for a few days. Then back to his regular food but go easy on the portions.
He needs to go on the antibiotics immediately. Even waiting a day could mean the difference between life and death.
Also, could you tell us what size his tank is, if it is cycled and does it have a filter and heater? What are his water parameters (
ammonia, nitrites, nitrates)? He NEEDS to have warm water to heal and stay healthy. Bettas need water about 80-82F. If he is constipated at all colder water will only make it worse. Bettas kept in water 80F - 82F will never get ich.
If he is kept in a bowl it will be very difficult to medicate or help him. Bettas need tanks at least 3+ gallons and preferably 5 gallons or more that are cycled and filtered/heated. Pet stores will have everyone believe that Bettas are fine in bowls but it is not true.
Please keep us updated and we are here to help in anyway we can.