The specification of your laptop battery is 51 Wh, which is a unit of energy. Overly simplified, the battery could provide a power of 51W for 1 hour. Or 102W for 30 minutes. Again, it is not quite that simple, but the examples here are not entirely wrong either, and should allow you to get an idea of what this unit means.
The specification of your charger is 180W, which is a unit of power. I.e. it is able to provide a sustained power of 180W.
Consequently, the two specifications are not interchangeable. If you use a charger specified for less than 180W, your laptop might not recognise it at all, or it will run with reduced performance. Or in the absolute worst case, the charger blows up, which might even cause damage to your laptop. Powerful laptops these days are often designed in a way, that the battery alone can not provide enough power to run all components at maximum performance. Instead, they require the charger(s) to provide enough power. And the other way round: some laptops can even draw more peak power than the charger is designed for. In these cases, the battery is used to provide the delta, discharging it despite being connected to an outlet.
To answer your question: depending on which charger you buy, it might not be safe to use one rated for less than 180W. In any case, using a lower powered charger will result in lower performance of the laptop, or the charger might not be recognised at all. I strongly advise against using a charger rated for lower power than 180W in your case. Judging by the main components of your laptop alone (GTX 1070, Intel CPU with 45W TDP), it definitely needs a charger that can provide 180W.