See Community Standard number 25.
You can check if a user is allowed to see the content using GetPolicyInfoForPlayerAsync and checking if “YouTube” is in the AllowedExternalLinkReferences array. (most information from this post: RoGMT | Global Moderation Team - #7 by steven4547466)