It's legal if you're an Aeroplan member, but not if you're a Mileage Plus and I have no idea on Air Points, Kris, Royal Orchid, M&M etc etc.
I'm a tad rusty on this, but from memory it's because UA base trans-pac fares on specific routings and legal transfer cities, whereas AC bases their fares on the more common Mileage system.
Awaiting corrections !!!!!!
(Caveat with Aeroplan - if you use UA as part of the itinerary on a Star reward, then their routing restrictions must come into play on the whole trip, making a YVR transfer a no-no. A Star reward combo of NZ/AC on the other hand, comes under the mileage rule, so AKL-HNL-YVR-NYC is legal.)
Awaiting corrections!!
(Attorney gives good advice - best to check in the forum of your host FF scheme. They're all different).