The check engine light is a warning that there is a failure in the power train control system. When it flashes it is warning there is hard fault, type a misfire that will damage the catalytic converter. We need to check for trouble codes, most parts places will scan for free. If you have the 4.6,5.4 or 6.8L engines the most common failure would be a coil. These ignition systems use individual coils over each spark plug. Best to check with a scanner like the dealer that can show power balance results. If you know the code you can swap coils with another cylinder and see if the code changes. Sometimes the plugs get fouled and need to be replaced too.
let me know what you find
The only way I would drive would be if I knew what cylinder was the misfire and disconnect the injector. If the coil works sometimes and the injector still sprays it could cause the catalytic converter to fail.