I believe AirNZ staff will do this IF it doesn’t involve Air NZ.
A couple of reports that were along the lines of, for example, have UA*G in booking to get seats lounge etc, and then change once in the lounge to KF to accrue the miles.
However, Air NZ won’t allow entry on, for example, UA*G and then change to NZ Airpoints once in the lounge