Yes, polylines to extend the abstract path class, so you can set the linewidth dynamically:
polyline.setStyle({weight: 5});
for example.
You will also need to listen to the zoom events. Leaflet provides you with the "zoomend" event, so for example:
map.on('zoomend', function() { /* ... */ });
lets you act on zoom changes.
Max