Specific sponsorship ie a company sponsoring a project and having mention/logo/link on a readme/sponsors page etc I think is quite acceptable.
A random Google ad (particularly with the privacy invasive tracking that goes with it) on the page is going to give an altogether different appearance, particularly if the project is using free resources such as GitHub/read the docs/etc.
What if Google wanted to support an Open Source project. Would it still be appropriate if the project mentioned Google as a sponsor, then showed a banner ad promoting the new Google Phone (no tracking/banner does not change)?
It's not a classical open-source project, but what we did with our React.JS koans (and other our OSS repos) was to advertise our React.js book in the README and give a discount code. Essentially, it's an ad for our own book.
The book ad was there almost from the beginning, so we've assumed that the contributors are aware of the way this repo is funded.
As for sponsoring other products/companies - we'd need to see if it's aligned with our goals and with our target group. I don't remember anyone approaching us so far.
A random Google ad (particularly with the privacy invasive tracking that goes with it) on the page is going to give an altogether different appearance, particularly if the project is using free resources such as GitHub/read the docs/etc.