This one is such a sticky situation it crops up all the time. You need to be coming in/out on a direct international connection to use the SYD-MEL tag. So yes, usually it's part of LAX/SFO-SYD-MEL, but you could do AKL-SYD-MEL or SIN-SYD-MEL in theory.
A few years ago I booked MEL-SYD(UA)-KUL(OS) and was ticketed fine. Was nearly refused carriage when I showed up to check in because of the silly local rights issue but convinced them it was OK as I was departing on a same day Star Alliance connection. I don't think they have this one settled properly though.
Easier to just go direct to MEL anyway. SYD's a dump and you get no real bonus out of going SYD-MEL on UA.