Did photons appear during or before the inflationary period? If they did appear, could they go anywhere without being absorbed by some kind of intergalactic gas [before the stars and galaxies appeared]?
Good question. Photons per se didn't appear until the breaking of the electroweak symmetry, which was right about at the end of the inflationary epoch. But still there were some sorts of massless gauge bosons flitting around the universe all through inflation, that can serve as conceptual stand-ins for the photons we see nowadays (but that didn't technically exist back then).