I've just started casting from my laptop to a big TV for YouTube while doing programming stuff on the laptop screen.
I've found that using my trackpad can be a bit annoying just because the TV screen requires more finger movements to move across the big screen and the pointer is laggy/jerky on the TV screen.
But I have a spare mouse. If I could plug that in and have my trackpad pointer living on the laptop screen and the mouse pointer living on the TV screen, that would be an improvement.
I did find people asking similar questions on MS forums, but they were mostly also asking about keyboards, and perhaps-official answers were saying no, but not providing any technical details, hence I don't trust them. If it's not built-in maybe there are 3rd party tools for it.
(Yes there is YouTube on the TV too but it's less flexible and I can't listen with my wired headphones that way because it's too far away. Also I'm interested out of pure nerd curiosity if it can be done as there are obviously other use cases.)