Suppose every cyclic subgroup of $G$ has prime power order. Then $G$ has no subgroup $C_p \times C_p$ for prime $p$ if and only if for $a, b \in G, \; ab = ba$ implies that either one of them is the power of other or $(|a|, |b|) = 1$.
Suppose $G$ satisfies the condition for $a, b \in G, \; ab = ba$ implies either one of them is the power of other or $(|a|, |b|) = 1$. Let if possible $G$ has a subgroup of the form $C_p \times C_p$. i.e. there exists $x, y \in G$ such that $xy = yx, \; |x| = |y| = p$ for some prime $p$ and niether of them is a power of other. We have $C_p \times C_p \cong \langle x, y \rangle$, a contradiction to the given hypothesis.
Conversely, suppose $G$ has no subgroup $C_p \times C_p$ for prime $p$. Let if possible $a, b \in G, \; ab = ba$ such that neither one of them is the power of other nor $(|a|, |b|) = 1$. Thus $(|a|, |b|) = 1$ for some positive integer $d > 2$ i.e. $|a| = p^u, |b| = p^v$ for some prime $p$ and $u, v \in \mathbb N$. So $\exists x \in \langle a \rangle, y \in \langle b \rangle$ with $|x| = |y| = p$. We need to show that niether $\{x, y\}$ is a power of other. I am stuck here. How to proceed further.
You have shown one direction, so I'll comment on the other one.
We are given a finite group $G$ such that every cyclic subgroup of $G$ has prime power order. Assume, further, that $G$ has no subgroup isomorphic to $C_p \times C_p$.
Let $a, b$ be two elements of $G$ such that $ab=ba$. First, note that by assumption $|a|=p^n$ for some prime $p$ and positive integer $n$. If $\gcd(|a|,|b|)>1$, then $|b|=p^m$ necessarily, for the same prime $p$ and some positive integer $m$ (perhaps different from $n$). At this point, we are tasked with proving that $a$ is a power of $b$ or vice versa.
Now consider the subgroup $H=\langle a, b \rangle$ of $G$. Since $H$ is generated by two commuting elements, it is abelian. Also, since the orders of both elements are powers of the same prime $p$, $H$ is a $p$-group. (Convince yourself that this is true.)
By the structure theorem for abelian groups, it follows that $H$ has the form $$H = C_{p^{r_1}} \times \ldots \times C_{p^{r_k}},$$ for positive integers $k, r_1, \ldots , r_k$.
But $G$ has no subgroup isomorphic to $C_p \times C_p$, thus neither does $H$. We deduce that $k=1$. Can you finish off the problem now?