This is Exercise 4.2.6 of Robinson's "A Course in the Theory of Groups (Second Edition)". According to Approach0 and this search, it is new to MSE.
The Details:
On page 98 to 99, ibid., we have
Let $G$ be an abelian group and let $S$ be a nonempty subset of $G$. Then $S$ is called linearly independent, or simply independent, if $0\notin S$ and, given distinct elements $s_1,\dots, s_r$ of $S$ and integers $m_1,\dots, m_r$, the relation $m_1s_1+\dots+m_rs_r=0$ implies $m_is_i=0$ for all $i$.
. . . and . . .
If $p$ is prime and $G$ is an abelian group, the $p$-rank of $G$
$$r_p(G)$$
is defined as the cardinality of a maximal independent subset of elements of $p$-power order. Similarly the $0$-rank or torsion-free rank
$$r_0(G)$$
is the cardinality of a maximal independent subset of elements of infinite order. Also important is the Prüfer rank, often just called the rank of $G$,
$$r(G)=r_0(G)+\max_{p} r_p(G).$$
(See here for how the $\sup$ instead of the $\max$ is more appropriate. I don't think it effects the exercise is question though.)
A previous question might be helpful here. It's Exercise 4.2.2:
That exercise has a second part; namely, showing that $r(G)$ is finite implies $r(G)=\max\{ d(H)\}$.
The Question:
Prove that an abelian group has rank $\le 1$ if and only if it is isomorphic with a subgroup of $\Bbb Q$ or $\Bbb Q/\Bbb Z$.
Thoughts:
Let $A$ be an abelian group.
For the sufficiency, if $A\le\Bbb Q/\Bbb Z$, then $A$ clearly has no elements of infinite order, so $r_0(A)=0$. We need to show, then, in this case, that
$$\max_{p} r_p(A)\le 1.$$
Here, I am stuck.
I don't know what to make of when $A\le \Bbb Q$.
The necessity has me stumped too.
If $r(A)=1$ while $\max_{p} r_p(A)=0$, then $r_0(A)=1$, then $A$ would have all its nontrivial elements of infinite order. That's as far as I got. I'm guessing that, here, $A\cong \Bbb Z$
As I said above, I think I need to use Exercise 4.2.2, but I'm not sure how.
This appears to be a question I could answer myself with more time; however, I have given it a few days and I would like to move on. The type of answer I'm looking for is a full solution but I would be happy with strong hints.
Please help :)