Yes, of course. With a compact camera, it’s very straightforward. The housing usually allows you to control the zoom knob and easily zoom in and out. The port is made to be long enough to accommodate changes in zoom.
There are some exceptions, such as the Fantasea FRX100 VI housing which limits the zoom to 66mm in order to support wet wide angle lenses better. Nauticam produce some of their compact housings with interchangeable ports to better support wide angle lenses. When mounting the N50 Short Port you won’t be able to zoom as well.
For DSLR and Mirrorless cameras, it’s usually possible as well, but requires the addition of a dedicated zoom gear for the specific lens model you intend to use. The housing includes a zoom knob which controls the zoom gear that rotates the lens.
Some lens and port combinations do not allow zooming, so make sure you check that before choosing a lens or a housing.