In theory, yes. Most CD burning software offers this facility - make sure that you are creating an audio CD (not an mp3 CD) and that you finalize the recording (most software will do this automatically when creating an audio CD). Bear in mind that some older players do not recognise recordable CDs, especially "rewritable" ones.
However, some online stores use DRM (Digital Rights Management) to prevent songs being burnt to CD/played on other computers or devices. There are usually ways around this, but the simplest way is to avoid such stores.