Have you taken your little one to the Vet to see what might be causing stomach distress?? And perhaps it would not be a bad idea if you checked a list of foods that he/she should/should not eat. That might be a start and will help you out.
In general bananas are fine for dogs in small amounts. One concern might be teeth and sugar content, so only small amounts. But any dog can have a reaction to anything, just like humans. I second the idea of a vet checking what might cause stomach distress and keeping a diary. It could be that your little one is actually allergic to their food.