TLDR: In the situation pictured below

$d_{diff} = \sqrt{ (p_x-c_x)^2 + (p_y-c_y)^2 } - \sqrt{\frac{r_x^2 \times r_y^2 \times ((p_x-c_x)^2 + (p_y-c_y)^2)}{(p_x-c_x)^2 \times r_y^2 + (p_y-c_y)^2 \times r_x^2}}$
or, in the case that the ellipse is centered at the origin ($c_x = 0$ and $c_y = 0$)
$d_{diff} = \sqrt{ p_x^2 + p_y^2 } - \sqrt{\frac{r_x^2 \times r_y^2 \times (p_x^2 + p_y^2)}{p_x^2 \times r_y^2 + p_y^2 \times r_x^2}}$
Be warned that this is not the shortest distance from the point to the edge of the ellipse. Still, the value being calculated here is important in certain situations.
---THE REMAINDER IS THE BORING DERIVATION STUFF---
equation 1: $\frac{p_x-c_x}{p_y-c_y} = \frac{e_x-c_x}{e_y-c_y}$ (The points lie on the same line)
equation 2: $\frac{(e_x-c_x)^2}{r_x^2} + \frac{(e_y-c_y)^2}{r_y^2} = 1$ (equation of an elipse)
equation 3: $d_{point} = \sqrt{(p_x-c_x)^2 + (p_y-c_y)^2}$ (distance between two points)
equation 4: $d_{ellipse} = \sqrt{(e_x-c_x)^2 + (e_y-c_y)^2}$ (distance between two points)
equation 5: $d_{diff} = d_{point} - d_{ellipse}$
- Solving for $e_y-c_y$ with equation 1: $e_y-c_y = \frac{(p_y-c_y) \times (e_x-c_x)}{p_x-c_x}$
- Solving for $e_x-c_x$ by substituting line 1 into equation 2: $e_x-c_x = (p_x-c_x) \times r_x \times r_y \times \sqrt{\frac{1}{(p_x-c_x)^2 \times r_y^2 + (p_y-c_y)^2 \times r_x^2}}$
- Solving for $e_y-c_y$ by substituting line 2 into equation 1: $e_y-c_y = (p_y-c_y) \times r_x \times r_y \times \sqrt{\frac{1}{(p_x-c_x)^2 \times r_y^2 + (p_y-c_y)^2 \times r_x^2}}$
- Solving for $d_{ellipse}$ by substituting lines 2 and 3 into equation 4: $d_{ellipse} = \sqrt{\frac{r_x^2 \times r_y^2 \times ((p_x-c_x)^2 + (p_y-c_y)^2)}{(p_x-c_x)^2 \times r_y^2 + (p_y-c_y)^2 \times r_x^2}}$
- Solving for $d_{diff}$ by substituting line 4 into equation 5: $d_{diff} = \sqrt{(p_x-c_x)^2 + (p_y-c_y)^2} - \sqrt{\frac{r_x^2 \times r_y^2 \times ((p_x-c_x)^2 + (p_y-c_y)^2)}{(p_x-c_x)^2 \times r_y^2 + (p_y-c_y)^2 \times r_x^2}}$
---NOTES---
I tried generating some values and solutions for this problem in some CAD software, checked them against substituting $cos(\theta) = \frac{x}{\sqrt{x^2+y^2}}$ and $sin(\theta) = \frac{y}{\sqrt{x^2+y^2}}$ into user765629's equation and it did not produce the correct answer. I did the same for the equation I produced and it produced the correct answer.