Unless you have a fairly large solar panel, chances are that it won't produce enough current to drive the voltage up to 18V.
To answer whether or not a 12v peltier could be damaged at 18v, yes of course it could. The peltier would likely fail of thermal reasons (it would get too hot internally.) Now if you could somehow keep it cool enough, it might survive... but for how long? Pushing any electronic device past it's ratings means they will suffer in longevity.
What you really want to do is get the most power out of this solar panel. Getting the most power out of panel isn't just about volts. There is a whole field of study in this regard, termed MPPT or Maximum Power Point Tracking. A solar panel's power output depends heavily on how it is loaded. A peltier device is a significant load, almost a short-circuit; connecting one straight to a panel could mean a huge loss in power delivery. (Say the panel was rated for 20 Watts, but the cooler runs as though it's getting 5 Watts in full sun, plus then the battery never charges.) Research MPPT for more information about this.
What I would consider in this scenario is connecting the cooler to the battery, so that you know it will work as expected, and devising a way to only "enable" it when two conditions are met:
- The battery is near-fully-charged or better, and
- The solar panel is delivering power to the battery.
This is going to take some studying. Research ways to:
- Measure your particular battery's SOC or State Of Charge.
- Sense current flowing in a circuit.
- Switch power electronically, via MOSFETs (preferred) or transistors.
- Use "logic" circuits, either analog or digital, to take two inputs and create an output. Such a digital circuit is called an "AND gate", but there are many analog variants.
- OpAmps can function as logic circuits. Study those for even more options.