It seems like YouTube has started rolling out support for Picture-in-Picture (PiP) mode to everyone, even if they don't have a YouTube Red subscription. A number of users reported that they can use PiP mode in YouTube even though they don't have a YouTube Red subscription, and even though most of those users are located in the US, that's not the case with all of them, reports are coming from all over the globe. Such reports surfaced on Reddit, YouTube still did not comment on it, but it is possible that the feature is rolling out to everyone, on the other hand, this may be a glitch or YouTube is just testing the feature on some specific users who do not have a YouTube Red subscription, we can only guess at this point.
There's a catch in there, though, as users who reported that PiP is available to them, also report that it doesn't work with all videos, and that's something YouTube done on purpose, probably, so the 'glitch' explanation is quite probably wrong, YouTube is quite probably testing this feature for a global rollout to users who are not paying for YouTube Red. Every content owner on YouTube can disallow PiP playback, and based on reports, such option is almost always ticked when it comes to music videos. The source claims that they used the same app version that was reported to allow PiP to non-paying accounts, and they were unable to replicate its behavior (same goes for us), which probably means that this change is server-side, and that adds more fuel to the 'testing stage' theory.
Now, chances are you will not be able to use PiP in YouTube if you don't have YouTube Red, but you may be one of the lucky ones who have this option enabled, so it doesn't hurt to try, right? In any case, you do need to run Android 8.0 Oreo (or later) in order to use this feature, as PiP was introduced with Android 8.0 Oreo. YouTube will hopefully start rolling out PiP to everyone in the near future, in which case you will be able to spot that change in YouTube app's changelog.