$\mathbb{Q}[X,Y]/(Y^2-X^3)$ is not a UFD
Solution 1:
Just for funsies, here is another approach.
Claim: $A:=\mathbb{Q}[X,Y]/(Y^2-X^3)$ isn't integrally closed (it has a singularity at the origin).
To see this, note that $\displaystyle\frac{Y}{X}\in\text{Frac}(A)$, but that $\displaystyle \frac{Y}{X}\notin A$. Indeed, if $\displaystyle \frac{Y}{X}\in A$ then there exists polynomials $f(X,Y),g(X,Y)\in\mathbb{Q}[X,Y]$ such that $Y=Xf(X,Y)+g(X,Y)(Y^2-X^3)$. This is clearly impossible though. Note though that $\displaystyle \frac{Y}{X}$ satisfies $T^2-X\in A[X]$. Thus, $A$ isn't integrally closed, and so can't be a UFD.
Solution 2:
As Jared notes, your approach is fine. You also consider directly the relation $Y^2 - X^3 = 0$, which implies that $Y^2 = X^3$. Does this give you any hints for an element which has two distinct factorizations?