Your approach is correct. But what isn’t shown in the figure explicitly, are the non-inverting and the inverting input terminals.
This case, you can safely assume it’s a negative feedback. Hence, the feedback resistor Rf\$R_{f}\$, is connected to the inverting input terminal.
Therefore, the differential input voltage V+ - V- = -v\$V_{+} - V_{-} = -v_{i}\$
Hence, afterAfter applying the loop equations as you have done, $$ I_{f} = \frac{v_{i} - A(-v_{i})}{R_{f} + R_{o}} $$ $$ I_{i} = \frac{v_{i}}{R_{i}} $$ $$ I = I_{f} + I_{i} $$
and assuming the output resistance \$R_{o}\$ getting getting swamped by negative feedback, you get the same expression for \$Z_{in} = \frac{v_{i}}{I}\$ as given in the book.
Reference: Operational Amplifiers (Page 9)