Let $W=W(a,b)$ be a cyclically reduced word in $\langle a,b;\emptyset\rangle$ not equal $1$ that contains at least one non-zero power of $a$ and at least one non-zero power of $b$.
How can be proved that the group $G=\langle a,b;W\rangle$ is not a free product of two non-trivial factors?
First off, as pointed out by Derek Holt, your "conjecture" is wrong. You want to decide when $F_2/\langle \langle W \rangle \rangle$ (that is mod out by the normal closure of $W$) splits as a free product.
$F_2$ can split to be $F_1 * F_1'$, but there are many different ways to split $F_2$ in that way (any basis for $F_2$ provides such a splitting.) This provides the ideas for the "obvious" splittings. If $W \in F_1$, you get that your one-relator group will be isomorphic to $F_1/\langle \langle W \rangle \rangle * F_1'$. In this case, $W=U^n$, where $U$ is some basis element of $F_1$. It is algorithmically decidable to determine whether or not an element $U$ is an element of a basis, hence you can determine whether or not you have a one-relator group of the above form, hence have a group that splits as a free product of nontrivial groups. The algorithm is described in Lyndon and Schupp (of course), Ch I, Prop 4.19. The basic idea is that you will have to transform $U$ into $x^{\pm 1}$ or $y^{\pm 1}$ using a sequence of Whitehead transformations, and you can prove you only have to do finitely many before you shorten $U$ has much as you can, and if it isn't one of those, it isn't a basis element. (the algorithm actually is more general than this, but it is the basic idea).
To actually apply the idea, you can find a different basis, for example $(a,ab)$ is a basis, hence you know that $\langle a ,b \mid (ab)^n \rangle $ splits non-trvially, when $n\neq \pm 1,0$. Basically you use the automorphism group of $F_2$ to construct a different basis.
If your group does not have torsion then it does not split as a free product, since it would have to split into cyclic factors, and the one-relator group on two generators can't be isomorphic to $F_2$ ($F_2$ is hopfian). A nice result is that a one relator group has torsion only if the relation is a proper power of a word (this is Lyndon and Schupp, Ch IV, Thm 5.2). Using this you can tell that Derek Holt's example in the comments, $a^2bab^{-1}ab^{-3}$, can not split the group into a non-trivial free product, since it is not a proper power, hence the group does not have torsion.
A natural follow-up question: is whether this is the only way for the group to split? Yes it is! In fact the idea essentially holds for one-relator groups in any number of generators (greater than $1$). You can see the nice answer on mathoverflow. (The "essentially" comes from the fact that the one-relator does not have to be of the form $U^n$, since we don't have to split into cyclic factors as in your special case)