If $A$ is an abelian variety over a number field $K$, then the set of $K$-rational points $A(K)$ is a finitely generated group by the Mordell-Weil Theorem. By the classification of finitely generated abelian groups, we know that there exists a free part of this group, whose rank we can call the rank of the abelian variety.
Consider now an abelian variety over lets say $\mathbb{Q}_p$. Then the groups of $\mathbb{Q}_p$-points is not finitely generated anymore, see for instance (Is there an analogue of Mordell-Weil theorem for other fields?). So there is no (naive) generalization of the notion of rank to such abelian varities.
However, maybe there is a non-naive generalization of the notion of rank (lets call it ``generalized rank"), which is backwards compatible, i.e. such that if $A$ is an abelian variety over a number field $K$ and $\nu$ is place of the number field, we have $$\text{Mordell-Weil rank}(A)=\text{generalized rank}(A\times_K K_\nu)?$$ Possibly one would want this $\nu$ be such that $A$ has good reduction at $\nu$. One idea I had was to hope that the associated formal group law had a sensible analogue of a rank, however I don't see why and didn't find any reference to this in the literature.