If I enter the URL to a channel that was deleted months ago, my EE install seems to default to the homepage. I have read up on strict URLs, but if enabled, EE checks whether the first segment in the URL corresponds to a template group so its not possible to access templates directly inside the site group folder without adding it into the URL. Is there anyway to ensure old URLs like this display the 404 page listed, rather than the homepage without the use of a manual 301 redirect?
Enabling strict urls means that EE checks whether the first segment in any URL corresponds to a template group. If that's not the case, EE will display a 404. To my knowledge there is no relationship between this and what you say here
any templates in the site directory need to have the site folder name in the URL
Maybe you have to edit your question and elaborate. As far as I can see, simply enabling site URL should work in your case. If you want to target entries rather than template group, have a look at the require_entry parameter for the channel entries loop. If you want an in depth look at 404 pages, I recommend this guide to 404 pages in ExpressionEngine.
EDIT: question clearer now
I want to be able to access domain.com/template.html, not domain.com/site/template.html, but at the same time, not have domain.com/old_template_group/template take me to the homepage, instead take me to the 404 error page.
EDIT: cannot see any easy way
If you activate strict_url and then do a mod rewrite from /template to /site/template, EE will still redirect you to a 404 because your first segment will not be a legit template group.