A 2-year-old boy who is currently undergoing toilet training presents with a history of a reddish, beehive-shaped mass protruding from his anus during defecation. The mass typically reduces spontaneously or with gentle pressure from a parent. In addition to constipation, which underlying condition must be ruled out as part of the initial evaluation?