HellCustomerand welcome to JustAnswer.
This is a very strange situation indeed. The answer to the exact question you asked is yes, the citation is "valid". That is, it would not be dismissed for procedural reasons.
However, the real question is whether or not the case can be proved if you fight it. The fact that the officer told you that you were originally stopped for failing to stop at a stop sign, but were actually cited for a completely different violation will make the officer's testimony suspect, particularly if he admits the discrepancy.
Of course, he could simply testify that he cited you because you failed to maintain a safe distance from an emergency vehicle. In that case, you would have a credibility contest between yourself and the officer -- and you probably already know who usually wins those.
Were there any other witnesses? That is, did you have anyone in the car with you? Was there a second police officer?
This is just my view, but if I received a ticket under similar circumstances, I would fight it. Maybe the cop won't even show up, in which case the ticket will be dismissed and you win by default. If he does show up, you get to cross-examine him on the discrepancies between what he said and what you cited him for. If he's honest, you might well win at trial
The worst that happens is you lose some time and end up getting fined, which is pretty much what you'll get if you just plead guilty.
Thanks for asking your question here on JustAnswer & good luck with this odd situation. If you have any other questions, please let me know.