As long as there is supervision, sure.
my geman shephard was uber gentle around my infant nephews, even other people's infants. she snapped once when she was around 12 years old and the 3 year old jumped on her hind quarters while she was laying down. she had severe arthritis so i have to imagine that fucking hurt. still, that's the parent's failure, not the dogs. Someone jumps on me when I have hip dysplasia I'll belt them a good one too.
But a healthy normally friendly family dog playing with your kids, as long as there is supervision, is fine. I wouldn't leave an infant unattended with a dog, obviously, and I also wouldn't be comfortable with my infants in that position with a stranger's dog. Your dog can smell that the kids are part of the pack, so to speak. Other kids are merely tolerated.