The rule to change pronouns is only a guideline. It only makes sense to do so if the person reporting the speech wasn't included as a subject in the speech itself.
For instance, take your example sentence:
The emperor said, "Alas! Our foes are too strong!"
Let's suppose that the person reporting the speech lives in the same country as the emperor.
As a citizen of the same country, the foes of the country are also the foes of the reporter.
Therefore, in this context, the better way of converting it to indirect speech would actually be to leave the pronoun alone.
(1) The reporter lives in the same country as the emperor:
✔ The emperor exclaimed sorrowfully that our foes were too strong.
But if the reporter lives in a different country than the emperor, then it makes sense to change the pronoun.
Additionally, depending on who the reporter is reporting to, one of the following would be appropriate:
(2) The reporter lives in a different country and is reporting what happened to one or more citizens of the country that has foes:
✔ The emperor exclaimed sorrowfully that your foes were too strong.
(3) The reporter lives in a different country and is reporting what happened to one or more people who are not citizens of the country that has foes:
✔ The emperor exclaimed sorrowfully that their foes were too strong.
This is the same thing as a news story.
An American news anchor (reporting to Americans) would say this about America being at war:
✔ We are at war.
But an American news anchor (reporting to Americans) would say this about France being at war:
✔ They are at war.
You have to consider the pronoun that's appropriate to both the person reporting the speech and the audience of the report.
In your example, it's not clear if it should be their foes, our foes, or your foes because we don't know who's doing the reporting or who the audience is.
But while it's not completely wrong to report it as his foes—it's certainly not natural. It also isn't a completely factual report of what the emperor actually said—because the emperor actually spoke of foes beyond just his own.
Note, however, that the emperor could have been using the royal we when he said, "Our foes are too strong!" If so, then using him would be the only appropriate pronoun—because it was only the foes of his person that he had referenced. But, again, this can't be known without more context.
So, to provide an unambiguously correct answer to your teacher's example, you would have had to be provided with the actual identities of everybody involved—both in the direct speech and the converted indirect speech.