Yes, but check the bulb. Some are compatible with the fluorescent ballast, but some expect you to use a fixture that has had the ballast removed. The trend is towards the latter, because they are more efficient.
A CFL ballast can be modified with a bypass by snipping a couple of wires and tying them to other wires. It takes 10 minutes and it’s reversible. I did it myself after watching a YouTube video. The LED t8 replacement was cheaper and brighter and used less electricity.