It's okay to briefly mention a nutritional reason in the question, as long as the question itself is clearly not asking for nutritional advice. However, comments and answers shouldn't address nutritional issues.
Yes, having any mention at all of nutrition in the question can still invite discussion. But if you don't explain at all, and just give a seemingly arbitrary restriction, people are guaranteed to ask why. That's a good thing, since it might help clarify the restriction. For example, if someone wants to avoid sour cream, depending on the reason, they might or might not find other dairy products acceptable. Putting a reason out there as a given can help avoid that.
So just make sure to be clear that you're not asking about nutrition:
- State the nutritional part as briefly as possible, without making unnecessary claims or suggesting you're interested in more information. ("For nutritional reasons, I prefer to avoid X." as opposed to "I'm pretty sure X is super duper unhealthy/carcinogenic/toxic")
- State the actual question clearly, so that people know what they do need to address. This is always good, but especially good here.
As for answers and comments, I know it's tempting, but please try to avoid discussing nutrition.
Since nutrition questions are off-topic, we know the OP isn't asking about it, so there's no need to address it. The more points we make, the more likely it is we end up with a discussion. I can understand sometimes, especially for really outlandish claims, a brief "you might want to research more or ask a nutritionist or doctor if you actually need to avoid X." But let's not get into detailed discussions.
If you see folks providing substantial nutritional advice in answers, feel free to edit it out and let them know why. If you see nutrition discussion in comments, especially extended discussions, feel free to flag.