This is tricky for me because I think it matters whether the "answerer" knows the answer because they've heard the joke before, or they're hearing it for the first time and want to participate by trying to figure it out. Of course, the joke-teller might have no way of knowing which of those is true.
To me, riddles are supposed to be interactive. In most situations, I think the joke-teller should expect their "audience" to try and figure it out because that's part of the fun. I think it would be odd to get upset over it.
I would definitely take certain factors into consideration like the person's age. If a small child asks me, "What's black and white and read all over?" I would not let on that I know the answer because I understand that it's probably new to them and I don't want to ruin their punchline. If they ask afterwards if I'd heard it before, I might say that I have, but enjoyed hearing it again and they told it very well.
But if there was a room full of adults who were all born in the US, and are all native English speakers, and someone told that joke, I'd think they were expecting everyone to just groan and laugh, or answer in unison, because they'd know most adults know the answer since it's such a popular childhood joke here.