The new law could provide cities federal aid in dangerous heatwaves in situations where the demands exceed local and state capabilities for response.