Let $R$ be a ring (all rings are commutative with a unity), which is also a free $\mathbb{Z}$-module of rank $n$, and consider the ring $S = R \otimes_\mathbb{Z} \mathbb{Z}_p$, where $\mathbb{Z}_p$ denotes the $p$-adic integers. Then, $S$ is a free rank $n$ $\mathbb{Z}_p$-module. Suppose that $S$ is strictly contained in a ring $S'$, which is also a rank $n$ $\mathbb{Z}_p$-module (and a $\mathbb{Z}_p$ algebra). I want to show that then $R$ is strictly contained in some ring $R'$ which is also a rank $n$ $\mathbb{Z}$-module, with an index divisible by $p$.
I have managed to show the converse of the question above, but this direction seems harder. Somehow if $S \subset S'$, one should be able to extract a free rank $n$ $\mathbb{Z}$-module from $S'$, but I cannot see how to accomplish this.
The context of this question is the paper "Orbital L-functions for the Space of Binary Cubic Forms" by Taniguchi and Thorne. There it is stated on p.1341 (a cubic ring is an algebra that is a free rank 3 module over some other ring as described above with n=3)
"We say that a cubic ring over $\mathbb{Z}_p$ is maximal if it is not isomorphic to a proper subring of another cubic ring. We say that a cubic ring R over $\mathbb{Z}$ is maximal at $p$ if it is not contained in another cubic ring with finite index divisible by $p$, or equivalently if $R \otimes \mathbb{Z}_p$ is maximal as a cubic ring over $\mathbb{Z}_p$."