You won't get banned for using a 3rd-party client or client mod, unless you abuse the API in doing so (which you're not likely to do accidentally).
Anyway, the short answer is: yes.
I think all of the major client mods on PC have anti-tracking plugins. I use Vencord which comes with a "NoTrack" plugin by default (it disables Discord telemetry, metrics, and crash reporting). It also has a "ClearURLs" plugin that removes tracking elements from URLs. BetterDiscord also has similar plugins.
You can couple these with OpenAsar (it's compatible with all client mods - I use it alongside Vencord). Along with speeding up your Discord, it also comes with a "DoNotTrack" plugin that disables discord telemetry.
On Android, you can use Vendetta which, again, has a "NoTrack" Plugin you can add that disables discord telemetry and tracking.