Does is_user_logged_in() block search bots?

If you wrap some content in a is_user_logged_in() condition, all that content will only be rendered to users who have an account on your website and are logged into that account.

Now, do Google bots have an account on your website? Hell no. So no, that content will never be indexed by Google in your website. Also, it will never be visible to any of your not logged in visitors (that’s more than 90% of your visitors, unless you have some community website where people need to log in in order to use it).

The bright side of this technique is that the bad bots won’t be able to see that content either.

So the answer to your question is:

Yes. is_user_logged_in() hides content for all bots (excluding the ones intelligent enough to create accounts on your website and log in) and for about 90% of the average websites’ visitors (because people are lazy and never log in even if the do have accounts, unless they need to: you force/lure them to do so).

Well, here’s the updated answer for your updated question:

Normally, what you’re trying to achieve is not technically possible. It would be, if any SE would provide a method for it, using perhaps an account you make with them (think analytics account). But as of now that’s not an option.

About SE rules and policy, you’d be infringing SE rules if you tried to detect SE bots and fed them different content than what you feed to normal logged out users.