So, I killed a bunch of people in Whiterun, so the guards were hostile. I then started the quest where the innkeeper joins you to kill a dragon. When we passed some guards, they started attacking me. As well as the innkeeper. I went on to kill the dragon, and now I need to deliver the quest to the hostile innkeeper. Any way to finish this now, without turning myself in?
In order to talk to the innkeeper, you should get rid of your bounty. Then, you can deliver your quest.
You could try casting the spell "Calm" on him...
I had a similar situation arise due to the Markarth glitch. I used the shadow cloak of nocturnal power to sneak past all the guards and get into the room. It's been my experience that unless the guards see you and turn hostile, the npc's won't.
Well what I do, is I'll stay away for a while, then come back later. Next, I go up to a guard, who will say, "Wait, I know you." And join the Thieves Guild so you have the option to say "I'm with the guild, how about you look the other way?" The guild is easy to join so it won't waste time. You'll be able to skip out on other crimes like Thievery. So I hope this helps you, all hostile allies will not attack with you having no bounty.