Does the flow in an afterburner have to be subsonic?
Afterburners are subsonic but not because of that equation.
Afterburners are typically subsonic for a couple of reasons. First combustion is easier at low speeds. While supersonic combustion is possible (see scramjets), most times the combustion areas of a jet are the points where some of the slowest flow through the engine occurs. Secondly, the goal of the afterburner is not to increase velocity or pressure (in fact ideal combustion is isobaric, and real combustion features a pressure loss) but to increase temperature. The reason behind this is that high temperature gas releases more energy for the same decrease in pressure than low pressure gas. This is how turbine engines are able to operate, and why combustion occurs at the highest possible pressure. After the afterburner the flow becomes supersonic traveling through the nozzle, which in an engine equipped with an afterburner is almost always variable geometry.