When I entered this thread, your title was simply "Warcraft" which is a fantastic RTS (Real Time Strategy) series. I love the Warcraft games (1-3, especially Warcraft 2).
My original answer is I was going to point to the original Xbox 1 which was heavily modded back then, and with a Modded Original Xbox 1, one could get the older Warcraft to work on that machine...
That said, I see in the OP that you aren't talking about the the 1990's Warcraft games, but the now 12 year old World of Warcraft. WoW is an entirely different game, an MMORPG (Massively Multiplayer Online Role Playing Game), as you probably know.
So, that changes my answer because the original Xbox 1 I never saw modded to play WOW.
I believe I figured out what you saw though. What you saw with that friend signed in is someone signed into Xbox Live but on PC. They then are playing PC games while signed in to Xbox Live allowing you to see what they are up to on XbOne. I know I've played Street Fighter 4 on PC and my Xbox 360 friends saw me playing back in the day.
You are going to start seeing Win10 PC gamers playing some PC games on your Xbone from time to time.
Microsoft is allowing Xbox Live users to see what games people are playing on their Windows 10 PC. Steam does the same thing. I wouldn't read too much in to it.
I do the same thing on Steam for instance, I play non-Steam games but let my Steam friends see what I'm playing (like Starcraft and Diablo for instance).
If you have windows 10 you can record game clips from a few games and post them to your xbox feed, WoW is one of them.
"PC gamers are also getting a few Xbox niceties. After the Anniversary Update, the Game Bar in the Xbox app will support 60fps recording when you set your quality setting to “Very High.” The Game Bar will also have full-screen support in six more games, including League of Legends, World of Warcraft, DOTA 2, Battlefield 4, Counterstrike: Global Offensive, and Diablo III."
To answer, No you can't play WOW on the Xbone, you need a PC to play WoW.