Yes, you can set up various types of exclusions, either on the "scope" of the policy (i.e. which sites to cover) or on the sharing action itself, as part of rules (for example, it the file is shared by user XX). Keep in mind that the type of conditions/exceptions you can configure for any given rule will depend on the scope as well. For greater flexibility, create policies scoped to individual workloads, i.e. just for SharePoint Online or Exchange Online.
To add an exception to a rule, open the rule settings and under Conditions, hit the Add group button then toggle the NOT control and configure the exception as needed by selecting it from the corresponding Add condition dropdown: