Most of the times that this has happened to me, I have been able to tell if the the person was resisting to help me learn how to properly execute a technique or if the person was just being plain difficult. Depending on the type of person that I assessed him to be, I have acted accordingly. In good Aiki, I have asked the person to help me in getting the technique correct. In the person with bad Aiki, I usually went to the other technique that flowed best. When he would say that I did the wrong technique, my reply was that if he would do a better job as an uke, then I would keep with the technique that was being taught.
As an instructor, I have had students ask me what to do with difficult ukes, and in that case I will use that person on the next technique demonstration.
I would like to add, that I probably did not know the basics and the principles of Aikido well enough to use it on an unwilling uke for the first 5-6 years of my training. At one point, I internalized the art and have found that I can pretty much do a technique, whether the uke resists of not. Resisting hurts him much more.
Of course, when it is your turn to uke - be prepared!
As a 4th kyu, I probably would not have been capable of making an unwilling uke flow the way I wanted him to flow. I would have just moved on to a more willing uke, then let my Sensei know about the person that I was having problems with.