Yes. You can use any wired or wireless mouse and keyboard accessories with your Xbox console as long as they're compatible and can be paired with your console.
If you play on PC and Xbox interchangeably, it would be great to add a mouse and keyboard to your Xbox accessories arsenal. This helps you retain muscle memory when playing similar games on both platforms, giving you a competitive advantage.