Adding sidebar to template creates horizontal gap the size of the side bar

I’d guess that the get_sidebar() inside the loop is causing the problem. It should be outside the loop.

The way it is now, one post is displayed, then you call the get_sidebar() code, which displays the sidebar stuff, then the loop continues with the next post.

Move the get_sidebar() outside the loop.