You did not get the most general solution of this PDE. For example, the function $$u(x,y) = \frac{x}{\sqrt{x^2+y^2}}$$ satisfies it, but cannot be written in the form $f(y/x)$. Indeed, $u(1,1)\ne u(-1,-1)$ while the ratio $y/x$ at these points is the same.
The incorrect implication in your solution is
$$\frac{dy}{dx}=\frac yx \implies \ln y=\ln x+c_1$$
What you can actually conclude is
$$ \ln |y|=\begin{cases}\ln x+c_1,\quad &x>0 \\ \ln (-x)+c_2,\quad &x<0 \end{cases}$$
This leads to $u(x,y)=f(y/x)$ for $x>0$ and $u(x,y)=g(y/x)$ for $x<0$, where $f$ and $g$ may well be different.
Also, $x=0$ is problematic: the PDE makes sense there but the formula for solution doesn't.
Quoting from my answer elsewhere:
I would rather use notation $u(x,y)=g(\theta)$ where $\theta$ is the polar coordinate. After all, the PDE $xu_x+yu_y = 0$ simply says that $\partial u/\partial r = 0$ in polar coordinates. Any function that is independent of radial coordinate $r$ solves the PDE. And not every such function is of the form $G(y/x)$ since this form requires $u(-x,-y)=u(x,y)$ which need not be the case.
Generally, I recommend sketching characteristic curves to see the picture more clearly. In this case, they are half-lines of the form $\{(at,bt):t>0\}$ with $a^2+b^2\ne 0$. They are not lines through the origin, because the characteristic equation makes no sense at the origin.
Best Answer
ODE
Yes, for the "regular" ones, that is, for those satisfying the local Lipschitz condition or some more exotic condition forcing uniqueness of local solutions. Then the nature of an Initial-Value Problem enforces the number of integration constants to be equal to the dimension of the state vector. For scalar ODE this is indeed also the order of the highest derivative.
PDE
The equivalent of initial conditions are values along some curve or other surface bounding the integration area. As function the number of independent parameters is infinite, even just taking local variations into account. The existence and uniqueness of solutions can depend on the shape of the boundary. The nature of the PDE can couple distant parts of the boundary, meaning that the values on these parts are not independent. It is not at all guaranteed that a solution exists on a strip of uniform width around the boundary.