Yes, the battery needs to produce enough power to run the router, and power is measured in watts. Wattage is a colloquial term which means power. Your solar panel and battery must produce at least as much power as the router uses. If they produce extra that's also fine, in fact that helps keep things reliable.
The thing is, most batteries aren't sold with power ratings. Instead, they are sold with a voltage and an amp-hour rating. They will also have either a C rating, or a rated current. Power is current times volts, so if the battery has a voltage and a current rating, multiply them together to get power. If the battery doesn't have a current rating, you can work it out by multiplying the capacity (in amp hours) with the C rating.
By the way, 30W sounds like a lot for a router, even if that's the DC power from the panel and the inverter is losing some of it in the process of converting to AC. If you check the actual power usage with a multimeter, you might find it's less than that.
Once you have worked out if the battery has enough power to run the router, you'll probably want to work out how long it can keep it running for. If you divide the power you are using by the voltage, you'll get the current required in Amps. Then you divide the capacity of the battery in Amp Hours by the current in amps to get a rough time in hours that it will last for.