Dear fishibones, an important point is that at the beginning of Chapter II, Bourbaki states that all the rings he will consider are commutative. This implies that if a free module has finite dimension, this dimension is unambiguously defined. This property is called the Invariant Basis Number property (IBN) and may fail for non-commutative rings (Counterexamples can be found in, say, Lam's Lectures on Modules and Rings, Springer GTM 189.) This unambiguously defined dimension of a finitely generated free module is what Bourbaki calls its rank.
Let me emphasize that Bourbaki only uses "rank" in the above sense and ifi.e. for finitely generated free modules. If $M$ is such a free module of finite rank $r$ over the ring $A$, then for any prime ideal $\frak {p}$$ \in A$ the modules $M_{\frak p}$ over $A_{\frak {p}}$ and $M_{\frak {p}} \otimes_{A_{\frak p}} \kappa (p)$ over $\kappa (p)$ also are free of rank $r$. With this definition and use of rank, Bourbaki's Théorème 1 that you mention is perfectly correct (bien sûr!)
There is no contradiction with Eisenbud's exercise: he does not assume that his module $M$ has all its localizations $M_{\frak {p}}$ free over $R_{\frak {p}}$, whereas Bourbaki does. Eisenbud only assumes that the dimension of the $\kappa ({\frak p})$- vector space $M_{\frak {p}} \otimes_{R_{\frak p}} \kappa (p)$ is locally constant, while Bourbaki does not even mention this dimension when $M_{\frak {p}}$ is not $R_{\frak {p}}$-free.