No. Here's a counterexample.
Every 3-adic integer $x\in\mathbb Z_3$ has a unique representation as $x=\sum_{n\geq 0} a_n 3^n$ with balanced ternary digits $a_n\in\{-1,0,1\}.$ Define $f(x)=\sum_{n\geq 0} |a_n|/(n+1)\in[0,\infty].$ Define $d(x,y)=f(x-y).$ It's fairly easy to show this satisfies the triangle inequality; it suffices to consider finite integers, and each carry $3^n+3^n=3^{n+1}-3^n$ reduces the contribution to $f,$ from $1/(n+1) + 1/(n+1)$ to at most $1/(n+2) + 1/(n+1).$
Take $G$ to be the abstract subgroup of $x\in\mathbb Z_3$ such that $f(x)<\infty,$ equipped with the metric $d.$ This is an abelian Polish group. Fix $x\in G\setminus\{0\}.$ To show that subgroups containing $x$ are not locally compact, let's take an arbitrary $\epsilon>0$ and try to show that there is an infinite sequence of integers $p_i$ with $f(p_ix)<\epsilon$ but $f((p_i-p_j)x)>\epsilon/2$ for all $i<j.$
Lemma. For any $N$ we can pick $p\in\mathbb N$ such that $f(px)\in (\epsilon/2,\epsilon)$ and $p\equiv 0\pmod {3^N}.$
Proof. First write $x=3^ky$ where $y\not\equiv 0\pmod 3.$ Since $\sum 1/n$ diverges, a sufficiently good finite $3$-adic approximation $p'$ to $(3^N+3^{N+1}+3^{N+2}+\dots)/y$ will give $f(p'x)>\epsilon/2.$ Let $m$ be the greatest integer such that $f(3^mp'x)>\epsilon/2.$ Then $f(3^mp'x)<\epsilon,$ because multiplying by $3$ reduces $f$ by at most a factor of $2.$ So $p=3^mp'$ will do. $\square$
We can therefore pick sequences of integers $p_0,p_1,\dots$ and $N_0,N_1,\dots$ satisfying:
- $f(p_ix)<\epsilon$ for all $i$
- $\sum_{n=0}^{N_i-1} |a_{i,n}|/(n+1)>\epsilon/2$ where $(a_{i,n})_{n\geq 0}$ are the balanced ternary digits of $p_ix$
- $p_jx\equiv 0\pmod{3^{N_i}}$ for $i<j$
The last two conditions ensure $f((p_i-p_j)x)>\epsilon/2$ for $i<j.$