It depends on your playstyle
Here's what I would do if you tried to do that in an Adventurer's League game I was GMing:
"I grab his sword from its sheath and attack him with it", you say.
"Are you a battle master or something? Do you have a feature that lets you do that?", I reply.
"No I was just thinking he's close so I should be able to grab at it"
"Sorry, there's no action available to you that lets you do that. Stuff on people isn't really something you can typically interact with during combat, unfortunately. You can [list of options available to player]")
Here's what I would do if you were playing in a more improvisational game with an emphasis on detail-oriented combat:
"As I dodge past his spear into his reach, I make a grab his belt, aiming to free the sword from its sheathe", you say.
"He swings up at your face with the butt of his spear, rotating his hips to face you square on, which will make reaching the weapon difficult, even should he miss", I reply.
I roll an attack roll with the better of dexterity or strength for the fighter, adding proficiency only if I think he's particularly good with spears. His reaction is used for this, sort of like an Opportunity attack. If he hits you, he deals 1 to 1d4 damage, depending on how I'm feeling and what level you are, and I narrate him keeping you back-- you don't get a roll (that's what your AC is representing here). If he fails to hit you, then you get further inside his reach and you get to roll a Dex check to get his sword off him. It's a really hard check, so it's gonna be a DC 15 or 20 depending on how I'm feeling. Various proficiencies, like Sleight of Hand for example, may apply. If you get like a 30 you can fling the sheath in his face while you draw it and give him disadvantage on his next thing he does, but there's no way I'm letting you attack with his sword while grabbing it off him as part of the same action. If you succeed, you guys swap places on the battle mat, if you fail, you're on what used to be his left.
Here's what I would do if we were playing an intrigue-focused game I was GMing:
"I grab his sword from its sheath and attack him with it", you say.
"Yeah, but you don't though", I reply
"What?" You ask, confused.
"He's a professional guard. He's been training every day for the last 10 years, and regularly deals with desperate criminals making last-ditch escape attempts. He's in the prime of his life. You are a 60-year-old court ambassador slash international spy. You know both that trying to do that will all-but-definitely get you killed and how to keep a cool head under pressure and that even if by some miracle you did get the sword away from him he'd still beat you in a straight fight. Try something else."
Here's what I would do if it were a superhero-tier game and I was GMing and your opponent was a random dude:
"I grab his sword from its sheath and attack him with it," you say.
"Roll an attack v.s. AC 16 with disadvantage," I reply.
"Cool, I hit," you say.
"Nice," I respond, not bothering to have you roll damage, "now you have a sword and a dead fighter. What do you do next?"
As you can see, both the difficulty of the task and whether or not it is possible varies wildly between these examples. And that's just how I have run this sort of thing-- the variance will be even larger if some other person were involved as GM. The rules provide a framework you could use to let people attempt these kinds of things in a wide variety of different ways should you so choose, but whether or not to even let an attempt be made in the first place is also a question the DM must answer and on which the rules don't really have much guidance.