"veng wItoDmeH wIQaw'nIS."
Translation:We had to destroy the city in order to save it.
Yes, in the same way that the it in In order to save the city, we need to destroy it might refer to destroying something other than the city. The sentence merely assumes that the antecedent of the pronoun is the previously mentioned noun because we have no context otherwise.
But given ONLY the above sentence, it is most natural to associate the pronoun with the previously mentioned noun. Writing teachers have fits when students separate pronouns from their antecedents too far.