Go to Know-how under Preventive maintenance. Do the external checks shown there. If that is OK, the final thing would be to check the anode, if you can. Odds are that it will be mostly or completely consumed after 18 years, but there is so much variance in water and tank quality that it’s impossible to predict.
But if the tank is OK externally, then you might put a new anode in and check it after a year. If it fails within that year, then that’s that. But if it survives, the condition of the anode will give you an idea of whether it’s more economical to replace anodes or the whole heater. You can check back with us after that year and we’ll help you assess the situation.