This is a fascinating question and one that could be of use to you. Even though you probably should install a headlight on your bicycle if you plan on riding in the darkness, a flashlight is not a bad alternative. What you could seemingly do with an LED flashlight is to secure it to the front of your bicycle, possibly with a zip tie, and utilize it as a headlight. However, if you do think that this is a good idea, you must understand that some of these LED flashlights can output extremely intense beams of light.
Clearly, you would not want to ride with 1000 lumens of light flashing ahead of you. No doubt, you will blind someone and compromise people’s health. But, if you switched to the flood mode and the lowest possible lighting setting, you could really get away with this. Not only would you have enough light to see but you would not affect anyone else’s vision.