YANBU.
My mil tried this crap a few times. First time was a bag of sweets for a 5 month old. I shit you not.
I just say, 'thanks for the thought, but the DC dont need sweets. I won't be giving them ANY junk food until much much later (and I haven't!), so please don't bring them in future.'
This caused WW3. But as I'm more bothered about my DC health than my selfish MIL's finer feelings, I struggle to give much of a fuck.
I've always been nice with her, but I've NEVER once backed down over this issue. I've suggested she buy DC a small toy if she wants to give a treat instead of obesity and fillings but no, she's fixated on fizzy drinks and E numbers. And I'm the worst person in the world for not indulging her in this.
But she had her kids. That was her chance to do things her way. This is mine.
Anyway, after a few years she is now reluctantly seeming to realise that I mean what I say, and she gives a handful of grapes (which they love!) with a disgusted look on her face like I'm suggesting she feed DC horse shit - but she no longer comments.
So I would get DH onside, and then just take the pleasant zero tolerance stance.