In every text I have come across that deals with minimizing the Euclidean distance (without constraints) in a 2D plane, the titular assumption seems to have been made. The standard procedure goes something like this: \begin{equation} ds^2 = dx^2 + dy^2 \Rightarrow s = \int_{x_0}^{x_1} \sqrt{1 + \left(\frac{dy}{dx}\right) ^2} dx \end{equation} Where we are expressing the Euclidean distance between two points $(x_0,y_0), (x_1,y_1)$ as an integral, and under the positive-definite assumption, taking the positive root only. Now the problem is to find a function that minimizes this integral, and the Euler-Lagrange equations are employed: \begin{equation} \frac{\partial f}{\partial y}(x, y, y_x) - \frac{d}{dx}\frac{\partial f}{\partial y_x}(x, y, y_x) = 0 \end{equation} Here is my question: how can we use this form of the equation for our integral? Are we not suggesting that we can completely parametrize all paths between $(x_0,y_0), (x_1,y_1)$ using $x$? If yes, can this be proven? Moreover, when the first term of this equation is said to yield to $0$, is this not implying that $dy/dx$ is independent of $y$? (This is clearly false for implicit functions.) I thought that the most general function between two points in a plane is of the form $h(x,y)=0$.
I suspect it is implied that every function of the form $h(x,y)=0$ can be wrriten as $y=f(x)$ or $x=g(y)$, albeit in non-closed form, but I am unsure.
I think the reason is that this is often the first example given for calculus of variations, so it's done using the simplest form of the Euler–Lagrange equations. Of course, we know that the answer is supposed to be a straight line, which has this parametrisation unless it's vertical, but that's rather a post-hoc justification.
The true length functional for a parametrised curve $(x(t),y(t))$ is $$ L[x,y] = \int_a^b \sqrt{x'^2+y'^2} \, dt = \int_a^b f(x',y') \, dt, $$ where $'$ means $d/dt$ and everything in the integrand is evaluated at $t$. Making a perturbation, one finds an Euler–Lagrange equation for each independent variable, $$ \frac{\partial f}{\partial x} - \frac{d}{dt} \frac{\partial f}{\partial x'} = 0 \\ \frac{\partial f}{\partial y} - \frac{d}{dt} \frac{\partial f}{\partial y'} = 0. $$ In this case, these simplify to $$ 0 = \frac{d}{dt} \frac{x'}{\sqrt{x'^2+y'^2}} = \frac{x''}{\sqrt{x'^2+y'^2}} - \frac{x'(2x'x''+2y'y'')}{2(x'^2+y'^2)^{3/2}} = \frac{y'(y'x''-x'y'')}{(x'^2+y'^2)^{3/2}} \\ 0 = \frac{d}{dt} \frac{y'}{\sqrt{x'^2+y'^2}} = \frac{x'(x'y''-y'x'')}{(x'^2+y'^2)^{3/2}}, $$ which you can use to argue that the curvature is zero, so the curve is a straight line.
Alternatively, integrating the equations first gives $$ \frac{x'}{\sqrt{x'^2+y'^2}} = A, \qquad \frac{y'}{\sqrt{x'^2+y'^2}} = B $$ Then $A^2+B^2=1$, and $x'^2(1-A^2)=A^2 y'^2$, so either $A^2=1$ and $y'=0$ (so the curve is a straight line), or $A^2=0$ and $x'=0$ (so we again have a straight line), or $y'/x' = dy/dx = \sqrt{1/A^2-1}$ is constant, which is again a straight line; the constant $A$ has to be chosen so that the line has the correct gradient to satisfy the boundary conditions.
As far as writing in the form $y=f(x)$ goes, this is locally a consequence of the Implicit Function Theorem: given any point $c$ where $x'(c) \neq 0$, there is an open set around $c$ and a differentiable function $f$ so that $(X,Y)=(x(t),y(t))$ can be written in the form $X=f(Y)$ (essentially, one can invert the relationship $X=x(t)$ to $t=x^{-1}(X)$ locally on this open set, and then $Y=y \circ x^{-1}(X) = f( X)$ on this set).
This is good enough to derive the Euler–Lagrange equations, but can cause problems with global things like the boundary conditions: for example, if the answer ended up being a circle and the tangent becomes vertical at some point.