Re: What do you do when a student is acting rudely in your class.
I see a some underlying issues here. I'm not sure on this person, Person X's rank in your dojo? That is not clear to me. If he's a 7th or 6th Kyu then he falls under your domain in preparing students for testing. If he is a Dan rank then well it is what it is. Anyhow, you and he need to be clear on that. The second is your responsibility, to what degree are you responsible for the people in the class? These issues might be something you could bring up with your leader, your Cho or Sensei. Word to the wise: don't gossip, don't speak I'll of others, I don't believe it can have any positive impact to tear a student down or to say he doesn't deserve a black belt. That is someone else's decision to make. The thing is if you do everything for everyone, well what about your own training?
I think handling upper level students is difficult, anyhow. And also they are in a new role. Some things will pass with time. If you get him thinking about his own progress he may start training with upper belts. He may not. But if you do something else you may be successful while if you keep doing the same you will have similar results.
Some of the things you that irritate you mention are common habits of some people I have known over the years. It's funny how when someone was late for class or left early it didn't bother me at all as a student in the dojo. Sometimes it's what we make of things. Anyhow, it is a basic tenant of human nature that you can bring out the best in people or you can bring out the worst in people. I really do think you need to examine your actions to see if you could be escalating this situation in the wrong direction.
I'm sure most would agree he probably is not as badly behaved with all the instructors. It is easy to have an enemy. We come to Aikido for a challenge. This is it. If we take the easy route in Aikido then the learning is undermined. I truly do believe he is looking for leadership from you, and you are not providing a steady, clear sense of leadership. Nature abhors a vacuum. There are two ways you can look at it. Either he is stepping up since you are not, or he is seizing on an opportunity. Actually his motivations don't really matter, and he might not understand them either.
I know everyone pretty much has said he is wrong, and yes I have to agree. He has been non-compliant and disobedient. His Aikido must be way out there to not take Ukemi. How can he do randori? But, that is his training, not him. If he had bad instruction it is not his fault. He is a product of his environment.
Enough about him. What about you? Doesn't seem like he did anything actually dangerous, if he did you'd be all over it. Just irritating, possibly humiliating. But, isn't Aikido about humility?
He criticizes your technique during your demo, and that is not polite but, if I were you I'd respond to that. You said he "pointed out a flaw in my technique" which makes me wonder if there was a flaw, if he's shaking your confidence, or there wasn't a flaw. If there was a flaw then thank him for pointing it out. If there wasn't one then show him why there was no flaw, if you need further study to decide then say so. If he's shaking your confidence, well maybe this will prompt you to reexamine this technique. Maybe your rule book says you cannot respond, but some things are not covered by the rule book.
Granted, you don't want to start a conversation or an argument. If he has further comment, that's the point where you can let him know there isn't time in the middle of demos for such discussion. If you say you'll talk to him about it later then do so.
If it were me I'd stay away from a black belt and lower grouping if the black belt isn't someone who was my student originally. Truly, his Sensei isn't even in the dojo. If he is a black belt (?) You could perhaps do some technique with both of them. There can be far too much talking in Aikido anyways. If you show some genuine excitement about the technique you've shown then he may become convinced that he wants to do it too. You really really do not want to argue with a student in the class. I can understand your fear that he might corrupt these students, but it is just not worth it. The students probably want consistency, and if you can explain that to him it might help. Sometimes the why can go a long way in someones understanding. Walking on and off the mat could be a safety issue and he needs to ask your permission before stepping off the mat. You don't know if he's hurt or why? Tell him he can stay on the mat if he just wants to observe. Assume the best not the worst and you may be surprised.
Maybe if the Cho sees bad or wrong technique from lower belts you can tell him that Mr. X has been making his impact and that may get him kicked out, or talked to but sometimes, as an instructor you have to let go.
You need to advise these women on how to stand up for themselves, rather than trying to be Sir Lancelot. Advise them to suggest changing partners if they already worked with someone, heading directly towards someone else, whatever you would do in a similar situation. They came to martial arts class for a reason.
Yes, you need to intervene sometimes but be positive . Be creative. Have a random selection of partners, work in small groups, lines. "work in" with he and his partner. Make him want to take Ukemi. Tell him, you can't do line technique without Ukemi. THEN do amazing big throws. That sounds reasonable. Or Randori. He'd be salivating if everyone could do randori instead of him.
Politeness, the most important thing. Do not let this effect your practice, and then, let this bring you to a new level. It is difficult to progress as a black belt. This situation could be distracting you. This could be your call to action. This guy can't stop you. Unless you let him.