My professor was teaching us differential equations where he tried to solve the equation $$y' +\frac{y}{x} =0$$ After obtaining a general solution he asked whether the solution exists for x=0? The natural response was no. But then he transformed the equation into $$xy'+y=0$$ saying that it should exist.
My question is "Is such a manipulation allowed ?" Considering the new transformation doesn't allow the integrating factor method, moreover the transformation was done assuming $\frac{1}{x} x$ is defined when $x = 0.$
You're approaching the problem from the wrong side, I believe. Anyway, your objection is valid, although for a slightly different reason.
Suppose you have a solution $f(x)$ of $y'+y/x=0$; a natural question to ask is whether such a function can be extended to a continuous function at $0$. Asking whether such extension is a solution of the differential equation at $x=0$ does not apply (differential equations are solved over intervals, not at points).
Now, since for $x\ne0$, you have $xf'(x)+f(x)=0$, you can draw some conclusions, at least in some cases. The general solution of the equation is $$ f(x)=\begin{cases} c_+/x & x>0 \\[4px] c_-/x & x<0 \end{cases} $$ where $c_+$ and $c_-$ are arbitrary constants. There's no way to extend such a solution to $0$ so that the resulting function is continuous at $0$, except for the trivial one when $c_+=c_-=0$.
If the equation is instead $y'-y/x=0$, then the situation is quite different: all solutions of this equation can be extended to $0$. Indeed, the general solution has the form $$ f(x)=\begin{cases} c_+x & x>0 \\[4px] c_-x & x<0 \end{cases} $$ where $c_+$ and $c_-$ are arbitrary constants.
Some of the solutions are even differentiable at $0$ (precisely, those for which $c_+=c_-$); others aren't.
For this equation, $x=0$ is a singular point; solutions need not be extendable at the singular points even if algebraic manipulations remove the denominator. Think to $y'+y/x^2=0$, which can be rewritten as $x^2y'+y=0$, but whose solutions (except the constant one) cannot be extended by continuity at $0$.
Thus it's not sufficient to rewrite the equation without the fraction to guarantee that the solutions can be extended by continuity at $0$. More generally, if you have an equation such as $A(x)y'+B(x)y=0$, where $A(x)$ and $B(x)$ are defined and continuous on some open set, the zeros of $A(x)$ in this domain will be singular points and there's no general theorem that guarantees the solutions can be extended by continuity at these singular points.