Is it possible to connect that to nano X to stop leaking data about my funds to ledger or any other third party?
You can connect your ledger nano x wallet with full node if you follow this
GUIDE from ledger website.
Enable Experimental features in LedgerLive settings and then scroll down until you find Connect Bitcoin full node, and then click
connect, but please note that this is experimental feature in ledger.
You can also use Electrum and your own Electrum personal server.