Could bypass air be used to cool a rocket engine like in turbofans?
Air cooling is not going to contribute much here.

The Shuttle engines were cooled by liquid hydrogen (-253°C) from the fuel supply being pumped up cooling ducts inside the nozzle. Typical nozzle temperature in operation was around 54°C. Yes, fifty-four Celsius. (BBC Engineering Connections - see this Youtube clip)

The top speed of the SR-71 (about Mach 3.2) was limited by the temperature of the air arriving at the engines which, after being compressed in the inlet ducts, reached temperatures around 400°C. (Wikipedia: SR-71)

The shuttle passes Mach 4 about 2 minutes after launch.