  In this article we develop the theory of residually finite rationally $p$
(RFR$p$) groups, where $p$ is a prime. We first prove a series of results about
the structure of finitely generated RFR$p$ groups (either for a single prime
$p$, or for infinitely many primes), including torsion-freeness, a Tits
alternative, and a restriction on the BNS invariant. Furthermore, we show that
many groups which occur naturally in group theory, algebraic geometry, and in
$3$-manifold topology enjoy this residual property. We then prove a combination
theorem for RFR$p$ groups, which we use to study the boundary manifolds of
algebraic curves $\mathbb{CP}^2$ and in $\mathbb{C}^2$. We show that boundary
manifolds of a large class of curves in $\mathbb{C}^2$ (which includes all line
arrangements) have RFR$p$ fundamental groups, whereas boundary manifolds of
curves in $\mathbb{CP}^2$ may fail to do so.
