I would recommend:
(1) Firstly, one should study field theory and Galois theory fairly thoroughly. The main reasons are:
a. Fields are the best understood examples of commutative rings from an ideal-theoretic point of view (a field has exactly two ideals) and field theory often motivates many important concepts in commutative algebra, e.g., modules (analogue in field theory: vector spaces) and integral extensions (analogue in field theory: algebraic extensions); also polynomial rings over fields are the best understood types of polynomial rings and are one of the main objects of study in algebraic geometry.
b. The applications of commutative algebra to algebraic number theory, for example, is very much based on Galois theory.
(2) Once one has a solid understanding of field theory and Galois theory, one can start learning commutative algebra. There are many good books on commutative algebra at the basic level. I recommend Atiyah and Macdonald's "An Introduction to Commutative Algebra" for the following reasons:
a. The book presents commutative algebra in a very elegant manner. I can assure you that if you read the entire book (~ 130 pages) and do all the exercises, you will have a very solid knowledge of commutative algebra.
b. The exercises are excellent and introduce the reader to many important concepts in commutative algebra not treated in the text, e.g. the spectrum of a ring, affine schemes, faithful flatness, direct limits, Hilbert's Nullstellensatz, Noether's normalization lemma etc. It is highly recommended that one does, or at least looks at, all of the exercises since approximately half of the material in the book is treated in the exercises. Many exercises have hints (which are almost always complete solutions) and thus the book is suitable for self-study.
Unfortunately, I have not read too many other introductory books on commutative algebra. "Algebra: A Graduate Course" by Martin Isaacs is also a good introduction to commutative algebra; however, the book is not one on commutative algebra purely. Similarly, Serge Lang's "Algebra" is also a good introduction.
(3) I think that there are three main choices for commutative algebra reading after Atiyah and Macdonald: "Commutative Algebra" by Hideyuki Matsumura, "Commutative Ring Theory" by Hideyuki Matsumura, and "Commutative Algebra: With a View Toward Algebraic Geometry" by David Eisenbud. Chapter IV of EGA is also a good reference if you are comfortable with the idea of reading French. However, I have not read any of these books (although I will do so soon) and thus I cannot comment further. Note that Matsumura's "Commutative Algebra" has very few exercises.
I hope this helps!
I think the best books for what you are looking for are the following:
This is an introduction to algebraic geometry through Riemann surfaces/complex algebraic curves which does the kind of thing you want: it proves the equivalence of the different notions of genus, proves Riemann-Roch and explains differentials.
This is a new book translated and expanded from the Italian original which is highly overlooked. It develops CLASSICAL algebraic geometry using a minimal amount of commutative algebra (you barely need some notions of abstract algebra). It is developed in the most similar way to how the subject was done before the Grothendieck revolution which seems to have permeated every modern title. There you can find old definitions of genus as an "excess", a nonstandard (noncohomological) treatment of Riemann-Roch for curves, classical important examples and constructions for curves, surfaces and morphisms, and even the development of multiplicities and Bézout's theorem using old good elimination theory and proving its projective invariance arriving at the formula most modern books use to define multiplicity (and thus forgetting all classical motivation whatsoever, the dimension of a particular vector space).
Along with the previous two books, this wonderful title may help you do the transition to modern abstract algebraic geometry like no other. I think it is a great companion and complement to Beltrametti's for learning the basics of the modern style along the way. It has good examples and lots of (doable) exercises (like some very interesting and easy motivations for cohomology to solve conceptually geometric problems). This is a more algebraic treatment but which develops almost all needed concepts along the way and it is one of the best introductions to the language of sheaf theory in algebraic geometry without the need of schemes (but even defines finite schemes to define multiplicities, letting you understand the relationship of how Beltrametti does things and why jumping into schemes is a good idea in the end). So eventually, you end up understanding degrees, genus, Bézout and Riemann-Roch among other things through exact sequences.
Actually I think one cannot learn much from this book alone if it is not supplemented by standard theoretical titles like the ones above. Nevertheless it is a great source for classical examples and results which does a good job at complementing the other books as a companion. However I do not find it more useful than that as many other people do.
In my opinion one should try to learn Hartshorne's book (not to mention Liu's which is heavily less geometrically motivated) ONLY AFTER one has understood and worked through the kind of classical algebraic geometry done in Beltrametti's book and related that geometry with an algebraic foundation like in Perrin's. Hartshorne's is the best book around IF one works through almost all the exercises, but that is no easy task. He does not motivate from a classical perspective most of the constructions, definitions and results so one must be able to do so by knowing beforehand a small deal of classical geometry. Most modern standard books work through schemes and there you are leaving the world of classical geometry and entering commutative algebra with a geometric interpretation, which is what today is called "algebraic geometry". It is nevertheless a fascinating subject.
Along the way you will need to learn enough commutative algebra to understand modern algebraic geometry. For this I would recommend the pre-published version of the recent book by Kemper - "A Course in Commutative Algebra" since its originally freely downloadable draft version included lots of exercises and problems with all their solutions (the published version does not). A great book indeed for self-study if you can get it. For a much more complete reference dealing with all the material needed for Hartshorne, Eisenbud's book is the great, but lengthy and wordy, option. A nice new succinct textbook is Singh - "Basic Commutative Algebra", to use as a purely formal reference (but with doable exercises). A good geometry-motivated introduction for those titles is Reid - "Undergraduate Commutative Algebra".
It seems to me most people have forgotten what "classical" algebraic geometry really is for which you really do not need much commutative algebra. There are two kinds of people when approaching algebraic geometry: those fascinated by the algebraic/categorical modern approach, the algebrists, and those fascinated by the original very geometrical concepts and problems, the goemeters. A typical easy question for the old geometer school is "how many surfaces of degree $d$ contain a given spatial projective curve"; the algebrists do not bother about the visual geometric interpretation and just wonder "what is the dimension of the space of global sections of the degree $d$ ideal sheaf of an irreducible algebraic set of dimension 1" (which they solve trivially through an exact sequence of sheaves). The problem to me is that many modern books (and students) are completely blinded by the algebraic language/setting, and forget what geometry is about. The perfect student of algebraic geometry should care as much for, say, derived functors as for the old geometric school that started it all (above all the geometric problems that they formulated for curves, surfaces and varieties, many of which are still unsolved whereas too many students get lost in the world of schemes for too long without knowing any geometry at all).
Best Answer
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.