While a stomach bug or food poisoning typically doesn't directly harm the unborn baby, severe illness, dehydration, or complications from the disease can indirectly affect the baby's well-being.