I should say in advance, I'm a physicist, so I apologise in advance for any mathematical faux pas!
I've been attempting to prove some some properties of algebraic recurrence relations which converge on transcendental numbers from algebraic initial conditions, and thinking about the special case of the Newton-Raphson method led me to wonder about this particular question. I can think of special cases for which this would be true, such as $f(x) = e^{kx}$ (although this doesn't provide very interesting roots), but wondered if any more general properties of such a function are known.
Ignoring possible division by $0$, $f(x)/f'(x)$ is algebraic iff $f'(x)/f(x) = (d/dx) \ln f(x)$ is algebraic. Thus the condition for this is $f(x) = \exp(g(x))$ where $g'(x)$ is algebraic.