Can I tell my friend that the girl he was talking to over discord was transgender?
That depends. Why interfere in their business?
So he will stop texting her, they are dating right now.
If they're texting and dating, I imagine he knows this person is trans. Without sounding rude, you need to mind your business.
I'll see how things turn out before telling him.
It is not a good idea to out somebody like and it can be dangerous. So it is better to leave it alone, let your friend make his own decisions.