A motorcycle may overtake a vehicle on the right within the same lane if it is safe to do so. The traffic must be stationary or slow-moving and the way ahead must be clear. A motorcycle may overtake a vehicle on the left only if that vehicle is stationary or if it is turning right.
If high speed was involved, then the police would consider charges such as careless or even dangerous driving.
You can read the full version of the Land Transport (Road User) Rule 2004 at legislation.govt.nz