The book in fact says that her is correct. That's question 7, and the correct answer for 7 is her. Perhaps you confused it with the answer to 8, which is given as she.1 The relevant page is visible on google books: here.
1Question 8 is Was it (she, her) you were talking about?. The answer is given as she, which is correct for the formal style, but in the informal style it is also her. Compare with It is I who love you (formal) and It's me who loves you (informal) (CGEL, p. 459).
Interestingly, none of the three major contemporary comprehensive grammars of English (CGEL, ComGEL, and
Longman) contain the construction to be + a personal pronoun with a nominative/accusative distinction.
Of course, as Janus Bahs Jacquet observed in the comments, this construction is a particular case of A is B, and the rule there is that A and B should be in the same case. In your example, A is in the accusative, since it is the direct object of the verb think (We thought her to be him), and so B must be in the accusative (me/her/him/us/them/whom) as well.
There is an ancient grammar that does discuss the particular case under discussion, here:
Perhaps this subject will be more intelligible by observing that the words in the cases preceding and following the verb to be, may be said to be in apposition to each other. Thus, in the sentence, 'I understood it to be him', the words it and him are in apposition; that is, they refer to the same thing, and are in the same case.