Hit and miss at check-in, but you can always try to ask for your bag to be short-checked to IAD. I believe I've been reading more about UA agents putting up a fuss with that though, to specifically combat skiplagging. If you have a long connection between your IAD and YYZ flight, say that you're looking to buy souvenirs from the US and want to re-pack them in your checked bag - and then drop them off at check-in again.
Keep in mind that unless you have a Canada/US passport (or a few others), you'll still need to apply for a Canadian e-visa (ETA) since your flight tickets will state you're going to Canada.