Please note: redirection is not an option.
I figure the best way to do this is with the Yoast SEO API, but I’m unfamiliar with it. I think I need to adjust the following to include my desired sub-domain, but I’m unsure as to the syntax to get the rest of the generated URL in there.
add_filter( 'wpseo_canonical', 'http://www.' );