Some calculations:
Vin = 4.5V (actually a bit more with fresh set of batteries, but they drop quickly, and voltage sags under a load a bit, so let's just say 4.5V)
We don't know the Vf of the white LED. It varies from about 3.0V to nearly 4.0V, at the rated current, depending on the LED.
Assumption 1: Vf_led = 3.0V -> I_led = (4.5V-3.0V)/51ohms = 29mA
Assumption 2: Vf_led = 3.8V -> I_led = (4.5V-3.8V)/51ohms = 14mA
So they originally run the LED possibly at near 30mA, but it could be less. One way to know is to measure the current.
Then, what would be the maximum rated current for the LED? We don't know, so we would need to guess. Typically, cheap basic 5mm white LEDs are rated (absolute maximum continuous rating) between 30mA and 50mA, and recommended maximum varies between about 20-40mA.
So it's possible that they are already running the LED close to limits, but not necessarily so.
Now, assuming the "5V supply" is a regulated USB supply, they typically output around 5.1-5.2V, so let's calculate the current again:
Assumption 1: Vf_led = 3.0V -> I_led = (5.2V-3.0V)/51ohms = 43mA
Assumption 2: Vf_led = 3.8V -> I_led = (5.2V-3.8V)/51ohms = 27mA
This is highly likely to go too close to the maximum limits for comfort. It's probably going to be OK, especially in low-duty use, but I would change the resistor, or use an additional external resistor.
If you actually measure the current, you are able to adjust the resistor so that you measure the same current using the 5V supply.