Maybe yes, maybe no. The fact that you cannot book SYD-MEL as a free-standing flight on UA does not necessarily mean that you cannot book SFO-SYD (stopover) - MEL as a single ticket on UA. Depending on Australian restrictions UA might or might not be permitted to carry post-stopover passengers from SYD to MEL.
I have flown UA SFO-SYD, spent 5 nights, and then SYD-MEL. If it is on the same PNR, it was allowed back in 2009.
Also back in 2009 there was no SFO-SYD-MEL UA flight. There was a SFO-SYD UA flight, and a LAX-SYD-MEL UA flight. So if you are going from SFO to MEL on UA, you have to change planes in SYD. Not sure if things have changed now.