It depends on what you mean by "broadcast to the whole world".
According to the annotated transcript, John Young said it into a "hot mike", i.e. with the air-to-ground communications loop open:
[In the following, John doesn't realize he still has a hot mike. Charlie is only faintly audible through John's mike and the following undoubtedly contains transcription errors.] 128:50:37 Young: I have the farts, again. I got them again, Charlie. I don't know what the hell gives them to me. Certainly not...I think it's acid stomach. I really do.
So it was broadcast over a radio link to Earth, and anyone with the proper equipment could have picked it up.
However, communications between the spacecraft and mission control were not routinely rebroadcast. Mission control preferred to keep close control over communications with the public, and 12 days of cryptic acronyms would bore even the most avid space fan. To avoid situations exactly like this one where the astronauts could cause a minor embarrassment, audio (or video) from the spacecraft would only be rebroadcast on scheduled occasions (and even by Apollo 13, there was little demand for such broadcasts; I don't know if any were scheduled for 16).
Amusingly, it's almost four minutes from "I have the farts" until CAPCOM Tony England advises the crew that they're broadcasting.
128:53:58 England: Okay, John. We have a hot mike.
128:54:07 Young: How long have we had that?
128:54:10 England: Okay. It's been on through the debriefing. (Pause)