Step 1: Pick out the key features. The pain occurs only at the time of passing stool, with no vomiting, no blood and no features of obstruction. This points to a low rectal lesion that is irritated during defecation.
Step 2: Consider rectal polyp. A juvenile rectal polyp is the commonest cause of such localised symptoms in a child and characteristically causes discomfort or pain during defecation; it is the best fit here.
Step 3: Eliminate intussusception. Intussusception causes colicky pain, vomiting and red-currant-jelly (bloody) stools with a mass, none of which are present.
Step 4: Eliminate Meckel's diverticulum. It classically causes painless lower GI bleeding, not pain limited to defecation.
Step 5: Eliminate necrotising enterocolitis. NEC is a neonatal emergency with feed intolerance, abdominal distension, bloody stools and an unwell infant, not an otherwise well child with isolated pain on defecation.
Step 6: The correct answer is rectal polyp (option 1).