Yes, chronic pancreatitis, a condition that disrupts the digestion of fats, can cause foamy stool. Foamy stool can be accompanied by symptoms such as severe upper abdominal pain. It is important to seek medical advice for proper diagnosis and treatment.