Foam stools with rashes may indicate a malabsorption
disorder. A stool test
will help in arriving at a diagnosis. Since you are also giving formula feeds, improper hand washing and unhygienic measures can result in stool infections which can be a cause of altered stools. Also lactose intolerance
can lead to peri anal excoriation which results in reddish rashes which you mentioned.
I would suggest if your breast milk is adequate, you should exclusively breast feed him till at least 6 months of age. This avoids any infection that may occur due to formula feeds.
Please get a stool test done in the meantime. After cleaning the affected area with soap and water, tap it dry with a clean towel and apply siloderm cream over the affected area twice daily for 4-5 days.
Wishing your baby a speedy recovery.