Dear student,
No, the person standing nearby would not be able to hear the whistle as there is no atmosphere on the moon. Sound waves needs medium for travelling, but the moon has no medium for the propagation of sound. Therefore, no sound could be heard.
Regards