If UA does not codeshare the domestic YVR-YWG flight (I'm not sure UA codeshares any AC domestic flights tbh), then you cannot use a UA through fare as "domestic" fares (which is what US-CAN fares are classified as) do not allow secondary participating carriers.
So you are booking a UA SFO-YVR end-on-end with an AC YVR-YWG fare. Most of UA's SFO-YVR fares are not combinable with AC's domestic fares as they don't allow combination with AC fares on the 'within Canada' tariff.