You are probably going to have to make a child theme and insert your ad code in a copy of the header.php file. Don’t edit the theme files directly, because the next time the theme gets updated, your changes will be lost.
So if I were to create a child theme, any idea on the code I would use to make sure my ad code was next to my logo in the header?
Are you getting the code from another party, like Google Adsense? They should provide you with the HTML to add.
As far as location goes, do a search in the header.php file for the word logo and you should be able to see where to insert your code so it comes before the logo. Once it’s in place, you could add some CSS to properly position and style the ad.