Yes, you can play Cuphead multiplayer on an Xbox. Additionally, the recently released DLC Cuphead: The Delicious Last Course introduces an online versus mode that allows players to race through levels and compete for the best time and score. There is also the option to play with random players through matchmaking. However, splitscreen local multiplayer is not available on Xbox One, so the game must be played online together.
If a friend does not own the game, you can sign up for a free trial on Xbox Live and play together. Multiplayer is available in Cuphead, so you and a friend can play cooperatively as Cuphead and Mugman. Yes, Cuphead can be played online on Xbox One.