Do you know what a "conservative vector field" is? If you were to choose f(x,y) and g(x,y) as arbitrary functions and define the vector field f(x,y)dx+ g(x,y) then the integral from point \(\displaystyle (x_0, y_0)\) to \(\displaystyle (x_1, y_1)\) will typically depend upon the exact path between the two points. If the vector field is "conservative" then the integral depends upon only the two end points, not on the path between them.
The term "conservative" is actually from physics- referring to a "conservative" force such as gravity as opposed to a non-conservative force such as friction. A true MATHEMATICIAN would prerer to talk about an "exact" differential. A vector field, such as f(x, y)dx+ g(x y)dy is "exact" if there exists some function h(x,y) such that \(\displaystyle \nabla h= \frac{\partial h}{\partial x}dx+ \frac{\partial h}{\partial y}dy= f(x,y)dx+ g(x,y)dy\). Of course, that means that \(\displaystyle \frac{\partial h}{\partial x}= f(x,y)\) so that, integrating a second time, with respect to y, \(\displaystyle \frac{\partial^2 h}{\partial x\partial y}= \frac{\partial f}{\partial y}\). And \(\displaystyle \frac{\partial h}{\partial y}= g(x,y)\) so that, integrating a second time, with respect to x, \(\displaystyle \frac{\partial h}{\partial y\partial x}= \frac{\partial g}{\partial x}\).
Since, for reasonable functions, the "mixed second derivatives" are equal, \(\displaystyle \frac{\partial^2h}{\partial x\partial y}= \frac{\partial^2h}{\partial y\partial x}\), in order that \(\displaystyle f(x,y)dx+ g(x,y)dy\) be "exact" (or "conservative") we must have the "cross condition", that \(\displaystyle \frac{\partial f}{\partial y}= \frac{\partial g}{\partial x}\).
In this problem, \(\displaystyle ydx+ dy\), \(\displaystyle f(x,y)= y\) so that \(\displaystyle \frac{\partial f}{\partial y}= 1\) while \(\displaystyle g(x,y)= 1\) so that \(\displaystyle \frac{\partial g}{\partial x}= 0\). Those are not the same so this is NOT an "exact" (conservative) vector field.
You could also do this more directly (though a little more tedious) by looking for that putative function "h" that has that gradient. We want \(\displaystyle \frac{\partial h}{\partial x}= y\) so h= xy+ a "constant". I put "constant" in quotes because, since the derivative is with respect to x only, it might actually be a function of y: h(x,y)= xy+ p(y). Differentiating that with respect to y, \(\displaystyle \frac{\partial h}{\partial y}= x+ p'(y)\). But since p is a function of y only, that cannot be equal to 1 so this is NOT an exact differential (conservative vector field).