In general, you have for a compactly generated group $G = \mathbb{R}^n \times \mathbb{Z}^n\times K$, with $K$ compact. And there is no way to embed $\mathbb{Z}$ discretely in something compact, see Deitmar-Echterhoff Principles of harmonic Analysis on page 96. These are a reasonably nice family of groups, because the Haarmeasure is $\sigma$ finite, if(f) the group is compactly generated, I guess (?).

For Lie type abelian group on page 97, you have $G = \mathbb{R}^n \times \mathbb{T}^n\times D$, with $D$ discrete abelian. $D$ is here finitely generated, iff $G$ is compactly generated.

Seeing Mark Schwarzmann comment, you can move back and forth between the above descriptions via Pontryagin duality $\widehat{\mathbb{R}^n} \cong \mathbb{R}^n$, $\widehat{\mathbb{Z}^n} \cong \mathbb{T}^n$ and $\widehat{K}=D$. So essentially you want something like $K=D$ finite, but note there are examples like $D =\mathbb{Q} /\mathbb{Z}$, whose dual is the profinite completion of $\mathbb{Z}$.

Copied from Locally compact abelian groups: Corollary 7.54 of Hoffman and Morris "The Structure of Compact Groups" does the rest of the job: if $A$ is an LCA group, then each neighborhood of the identity contains a compact subgroup $K$ such that $A/K≅\mathbb{R}^m×\mathbb{T}^n×D$, where D is a discrete abelian group.

Theorem: $\mathbb{Z}$ does not embed discretly in a locally compact abelian group, iff there exists a compact subgroup $K$ with $A/K = \mathbb{T}^n \times D$ with $D$ discrete abelian consisting only elements with finite order.