My understanding is that in most or all contexts this is strongly discouraged.
That said, I just tried it out for testing purposes only, and in my brief testing the official Tor Browser + official uBO does block YT ads with no special configuration on my part.
I have an educated guess as to why it isn’t working for you (and how to ‘fix’ that–but before sharing that, I feel like it’s prudent to ask if you’ve considered and understood the risks and consequences of using a non-standard Tor Browser configuration?
Here is a disclaimer from the Tor Project:
the only add-ons that have been tested for use with Tor Browser are those included by default. Installing any other browser add-ons may break functionality in Tor Browser or cause more serious problems that affect your privacy and security. It is strongly discouraged to install additional add-ons, and the Tor Project will not offer support for these configurations.
and a PG thread on the subject. PG gives a similar but more explicit warning in the Tor Browser recommendation:
Danger:
You should never install any additional extensions on Tor Browser or edit
about:configsettings, including the ones we suggest for Firefox. Browser extensions and non-standard settings make you stand out from others on the Tor network, thus making your browser easier to fingerprint.