I agree with David Loeffler's answer: there is a large initial segment of algebraic number theory which essentially coincides with the study of Dedekind domains. A careful study of Dedekind domains gives an introduction to several important commutative algebra topics: e.g. localization, integral closure, discrete valuations, fractional ideals, and the ideal class group.
So one can motivate much of basic commutative algebra using concepts from algebraic number theory, but there is also a lot missing, for instance:
$\bullet$ Module theory. Modules over a Dedekind domain are "too nice" compared to modules over an arbitrary commutative ring. For instance injective = divisible and flat = torsionfree.
$\bullet$ The spectrum. The family of prime ideals in a Dedekind domain is unrepresentatively simple: all the nonzero ones are maximal. This is not a good motivation for spending time understanding the order-theoretic structure or the Zariski topology on $\operatorname{Spec} R$.
$\bullet$ Dimension theory.
$\bullet$ Primary decomposition. One can view primary decomposition in a Noetherian ring as a generalization of factorization of ideals into products of primes in a Dedekind domain, but once again the former is significantly more complicated than the latter.
$\bullet$ The Nullstellensatz.
Rather, if you study algebraic number theory and algebraic geometry at more or less the same time, you'll see that much of what you're doing is commutative algebra and that algebra will be well motivated. Among reasonably introductory texts I know of exactly one that pulls this off well: this text by my colleague Dino Lorenzini.
(Since my own commutative algebra notes have been mentioned, let me say that I view these notes as being at approximately the level of a student who has had a first, relatively nontechnical, course in either algebraic number theory -- e.g. from Marcus's text -- or algebraic geometry -- e.g. from Shafarevich's text -- and has been told that she needs to learn some commutative algebra before proceeding onward. On the other hand, my notes draw more explicitly on examples from topology and geometry than from either of the aforementioned areas.)
I think your assumptions are wrong (not that it is important for the issues). Arguably, one of the first books on commutative algebra was written by Zariski and Samuel with the explicit intention of codifying the algebra necessary for their work in algebraic geometry. It still is one of the deepest books in the field, though not easy to read. For example, it proves Zariski's main theorem (a very important theorem in algebraic geometry) in the strongest form, which is difficult to find elsewhere. It also deals with resolution of singularities at least for surfaces. A short, but extremely well written book on the subject is Serre's Local Algebra. Another classic is Nagata's Local Rings, again proves many theorems useful in geometry, it is short and has probably some of the best counter examples. Last, but not least is the book by Kunz, where the results are oriented towards geometry, but with a special emphasis on problems related to equations defining varieties.
Best Answer
"Is this course sufficient to prepare myself for Hartshorne's Algebraic Geometry? Or do I need to study more chapters?"
You need to to study fewer chapters, the exact number being (to first order approximation) zero.
What I mean is that Hartshorne uses a very restricted number of results in commutative algebra:
Hilbert's Nullstellensatz, Krull's principal ideal theorem, characterization of factorial rings by principality of height one primes, finiteness of integral closure and a few other theorems.
These results are very important and very hard in the sense that no student having just learned the relevant definitions could find the proof himself.
However you can then take these grandiose theorems on faith, as black boxes, or check their proofs (maybe later, at your leisure) in Eisenbud or other books on commutative algebra, like Zariski-Samuel or Matsumura.
But there is absolutely no need to read the 355 pages comprising the first 14 chapters of Eisenbud: they are very interesting but studying them seriously is not at all required and would actually prevent you from learning genuine algebraic geometry for a very long time.
I would advise you to very thoroughly study the first few chapters of Atiyah-Macdonald in order to familiarize yourself with the basic concepts, browse through the rest of the book and simultaneously start Chapter 1 in Hartshorne.
Godspeed!