Hi and welcome to the forum! I am glad that I can help you.
You would like to know what causes the blue bump that you are experiencing right outside the anus .
There are conditions that cause changes round the anus or on its lining. A fistula is represented as a small red spot that continues in a thin channel, through which sometimes there can be a discharge of feces or pus. Hemorrhoids are another condition that causes livid(blue) changes on the lining of the anus. They are usually presented as small sacks that may fall out and return in the anus while defecating. There are several stages of hemorrhoids on which the treatment is based.
Given the data that you described, it is likely that you may be experiencing hemorrhoids. You may consider seeing a gastroenterologist or abdominal surgeon to confirm or rule out hemorrhoids. You may also consider changing your menu to include soups, vegetables and fruits. You may also consider avoiding pushing while defecating to avoid hemorrhoids.
Please keep in mind that I provide medical information only. I am not able to diagnose medical conditions online. Please contact your doctor or other qualified healthcare provider such as a gastroenterologist or abdominal surgeon for further advice and information about diagnosis and treatment options.