Consider
H=2mpx2+py2+21mω2(x2+y2)
whose invariance under the rotation of the coordinates and momenta leads to the conservation of lz. But H is also invariant under the rotation of just the coordinates. Verify that this is a noncanonical transformation. Convince yourself that in this case it is not possible to write δH as ε{H,g} for any g, i.e., that no conservation law follows.