Yep – if I understood you correctly – but it failed.
This “works” (ie gets the footer back into the wrapper)
</div>
<?php get_sidebar(); ?>
<div><?php get_footer(); ?>
</div>
</div>
But it fails validation:
Please, validate your XML document first!
Line 272
Column 5
The element type “div” must be terminated by the matching end-tag “</div>”.