Heard that this part should be replaced and I can't find a replacement part for my model in my manual or online anywhere. Can I just buy a generic one at the hardware store and what kind should I get? I have a Whirlpool 319118-002.
There are only a few types of anodes out there -- different materials (aluminum, magnesium, aluminum/zinc) and different form factors (rigid vs flexible/segmented, hex head vs combination).
Your heater comes stock with an aluminum hex anode (all American/Whirlpool/US Craftmaster heaters use aluminum, and the manual for your heater has a parts diagram on page 30 that depicts a hex anode -- so you should be able to replace it with a standard hex anode, unless you have overhead clearance problems that require a flexible unit. I'd get a magnesium anode for your replacement if at all possible -- our bodies don't get along particularly well with aluminum ions.