I am not sure that this topic should really be in the Books (it seems more N&N to me), but I will repy all the same, for what it's worth.
I have a (very) old Wargame by SPI called "War of the Ring". It basically has most of the forces that were known to be active in the War of the Ring and, based on that, I have come up with the following list (which includes quite a few of my own additions):
FREE PEOPLES
Forces of Gondor
Both infantry and cavalry, split by reference to the region which they came from, eg Minas Tirith, Dol Amroth, Ithilien (Rangers), Anfalas, Belfalas, Lebennin, Lamedon and Anorien. As far as the Minas Tirith forces are concerned, you might also differentiate the Guards of the Citadel.
Individuals: Denethor (

), Faramir and Prince Imrahil (although you could also include the leaders from the various regions who arrived with their forces to reinforce Minas Tirith, ie Forlong the Fat and co and, possibly, Mablung and Damrod as Faramir’s lieutenants).
Forces of Rohan
Mainly cavalry, split between Edoras, Helm’s Deep, the East Mark and the West Mark.
Individuals: Theoden, Theodred, Eomer, Eowyn, plus I would include Hama, Gamling, Elfhelm, Grimbold and Erkenbrand.
Other Men
The Dunedain, led by Halbarad.
The Bardings (of Dale and Esgaroth), led by Brand III.
The Beornings (Woodmen of the Anduin valley and Western Mirkwood), led by Grimbeorn.
The Druedain, led by Ghan-buri-Ghan.
Elves
Elves of Mirkwood led by Thranduil.
Elves of Lothlorien, led by Galadriel and Celeborn (you might also include Haldir as an individual character).
You might also include the Elves of Rivendell, led by Elrond with Arwen (if you want her as a warrior), Glorfindel and Erestor as notable individuals, although they were not active militarily in the War of the Ring. Elrond’s sons, Elladan and Elrohir certainly were, however.
In addition, there would have been some forces at Mithlond (the Grey Havens) led by Cirdan, with Galdor as a notable individual, although they, again, did not see active service in the War.
Dwarves
Dwarves of Erebor, led by Dain II.
There were also Dwarves in the Iron Hills and the Ered Luin.
Hobbits
They might have raised a force, if attacked. Mainly from the Shire, although there were also Hobbits (and Men) in Bree. Various individuals might be included (Farmer Maggot, Farmer Cotton, Will Whitfoot, Robin Smallburrow and Fredegar Bolger, for example).
Ents
Based in Fangorn. Notable individuals: Treebeard and Quickbeam.
The Fellowship
Aragorn, Gandalf, Legolas, Gimli, Merry and Pippin all saw action in some of the battles. Gandalf should be differentiated in his Grey and White forms. Boromir would have led the armies of Gondor in different circumstances. And Frodo and Sam should not, of course, be forgotten.
FORCES OF SAURON
Orcs of Mordor, Dol Guldur and the Misty Mountains (including Moria). You could differentiate between Orcs of different types, although the main differentiation would be between “standard” Orcs and Uruk-Hai.
Individuals: Grishnakh, Shagrat and Gorbag.
Trolls: Mainly Olog-Hai (arguably sun-resistant) from Mordor.
Other individuals: The Witch-King, Khamul (the Nazgul in command at Dol Guldur) and seven other Nazgul. Also the Mouth of Sauron and Gothmog (assuming that he was not a Nazgul).
Men: Haradrim, split between infantry, cavalry and Mumakil (Oliphaunt mounted), plus Easterlings, Southrons (from Far Harad), the Variags of Khand and the Corsairs of Umbar (naval).
FORCES OF SARUMAN
Orcs, mainly Uruk-Hai, although you might also differentiate the Half-Orcs referred to by Merry in
Flotsam and Jetsam.
Individuals: Ugluk.
Dunlendings, led by their Chief.
Ruffians (Men of Bree?).
Saruman and Wormtongue.
OTHERS
Gollum.
The Barrow-Wight, the Balrog (Durin’s Bane) and Shelob, all of whom might or might not have been allied with Sauron, depending on your viewpoint.
Old Man Willow.
Tom Bombadil and Goldberry.
Phew! I think that just about covers it.