Glad there aren't any of those signs up around here. I grew up feeding the ducks at the park and to lose that would ruin it for future generations. I never throw bread, but I still love feeding at the park.
Sometimes it's best to just walk away and not say anything at all, especially if the man talking to you was older than you. I don't care how old you are, elders are elders after all.
He probably wasn't lecturing you, but just making sure you knew about it. After all, your friend did start feeding them after you left and probably had the bread in plain sight while you were talking to them, so honest mistake. Even if you are a regular at the park, it doesn't mean that no one can talk to you about it.
Admittedly he was sort of rude, but who's to say he didn't later talk to your friend about it and that he wasn't just trying to keep you out of trouble in his own way, similar to you talking to those who throw rocks at the ducks.
I often get comments like these from people and I always just excuse them for saying it because mostly they just didn't know I knew.