This will work, I've done it multiple times. Caveats:
-- You must be booked on a native code (not codeshare) to upgrade as a Staralliance award.
-- United will refuse to re-code your flight unless you are attempting to use a GPU, and GPU's are not eligible on Z class.
FWIW, I have applied United GPU's to ANA C and D class flights multiple times, availability tracks directly with the Staralliance upgrade tool and Expertflyer. This and Lufthansa F easily best uses of United instruments in the system.