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.
I've used them since 2016. I really doubt anyone has gotten banned for anything other than using plugins that spam the API or access experimental features you're not meant to have.
Not to my knowledge, but oh well. Turns out I much prefer life without Discord anyway, but it's still annoying that they never actually told me what the ban was for.