It’s not considered normal, perhaps even a faux pas. Arguably, it would be considered rather uncivilized. Though either way I would not recommend doing so, as you may end up ingesting contaminants.
Grass and flowers should always be rinsed off before being consumed.
As for eating out of somepony’s garden, well, just like with anything else, it’s not socially accepted to just take other ponies’ things without permission or destroy them. Such an act would be considered theft or vandalism.
Of course, such things can happen. I recall eating the petals off a potted plant once, because I was so hungry and stressed out, and that’s not too different from eating out of a garden. It’s important not to skip meals and to get sufficient amount of nutrients to be able to be a respectful and productive member of society.
Crazy OCD horse…