The difference between the two examples is the following. The expression $y'/y$ is the derivative of $\ln y$. Thus, it is possible to "integrate" $y'/y$.
On the other hand $y''/y$ is not the derivative of any expression $f(y,y')$. This is quite easy to see. We set $p=y'$ and use the chain rule to obtain
$$
\frac{d f(y,y')}{dx} = \frac{\partial f}{\partial y} \,y' + \frac{\partial f}{\partial p} y''\,.
$$
No, we need that $\partial f/\partial y = 0$ and $\partial f/\partial p=1/y$ in order to find the antiderivative $f(y,y')$. But if the function $f$ exists (and is sufficiently often differential), we have the Schwarz's Theorem
$$ \frac{\partial}{\partial y }\frac{\partial f}{\partial p} = \frac{\partial}{\partial p }\frac{\partial f}{ \partial y}.$$
In other words
$$ -\frac{1}{y^2}= \frac{\partial}{\partial y} \frac{1}{y} = \frac{\partial}{\partial p} 0 = 0$$
which is a contradiction. Thus, no antiderivative of $y''/y$ exists.