Keep dry and clean
and stool can be very irritating to a baby's skin, leading quickly to a diaper rash
The best treatment is to avoid it in the first place. Keep the area clean and dry, using a moisture barrier such as vaseline to keep material off the skin. If it appears, again keep it dry and clean, and use a thick coat of the moisture barrier, allowing the skin to heal. See the doctor if it persists.