I really think that every single person, no matter their grade/age/size/whatever, should be able to learn and improve from every single round of sparring no matter who their partner is. However, it won't happen if your goal every round is to "win".
Before I get into it, I need to say that in this, and any post, when I say "white belt" I mean a real Brazilian Jiu-Jitsu novice, not someone who has done 10 years nogi or is a judo 6th dan and just started jiu-jitsu.
Now, if you are sparring with someone roughly around your own level it's gonna end up a tough fight so just go for it. This is fine, and probably most of your sparring should be around this level. Outside of sparring with people you're roughly equal with is where it takes more work though...
What about when you are totally outclassed and have no chance? The biggest factor is that it's up to them how things are gonna go; they might decide to crush you and give you no chances at all or they might play around and let you move a bit. If they go with the first option then it's gonna be a tough roll but you can work on just trying to defend; keep your elbows tight, keep your chin tucked and don't try too much. Your aim should be to make it as hard as possible for them to submit you. But if they decide to give you a bit more room to work you should definitely try stuff... aim to try your best techniques that you know well, then pay attention to what they do to shut you down, counter or reverse. If they are rolling like this then most likely they will be happy to help you out with stuff as you roll too, so ask questions if you're stuck in a position and don't know what to do. Or if they counter your best attack, ask them how they did it (this would be better to ask at the end of the round).
Of course, the opposite situation is where you totally outclass your partner. This depends on the levels involved I think; a black belt rolling with a purple belt will get something out of totally crushing them, but a purple belt rolling with a white belt probably won't (unless the white belt is ultra strong/athletic maybe). If you're way better than someone you should try to make it interesting, you know you can submit them so there is little point in doing that again and again. Try to work on one specific attack (multiple entries into the same submission, multiple attacks off the same set-up, secondary attacks after letting them escape the first etc) or constantly put yourself in bad positions or work on submission escapes. Work on new techniques you've learnt and see what happens in a full resistance situation, or something else I like to do is try to get into weird situations/positions which I haven't experienced before and then work from there. Obviously another good option is to help whoever you're rolling with :-)
But those situations are the more normal stuff...
What about the guy who will just stay inside your closed guard, not try to pass and is tough to sweep or submit? Just look at it as a good challenge... you know you're doing well if you manage to sweep or submit for a start, and if you can't get close then open up your guard and try to make them work. It might result in you getting your guard passed but it's training not competition. It might not end up being the most useful of sparring, but it's only one round and it's a tactic you will probably come up against at some point if you compete.
Another type of person I know people don't like to roll with are the really small students who are also not strong. Some people almost seem to feel like it isn't a challenge, but the challenge should be twofold; don't overpower them with strength, just use good technique, and keep your ego in check. I have seen many times where a stronger man is rolling with a woman and they will roll without strength until they end up in a bad position, then they go all out and use strength alone to escape. Don't fall into that trap, you won't learn anything new, you won't be able to use that tactic against people who are also strong and you're missing out on great training... the smallest students have nothing but technique to rely on, so the chances are they can definitely teach you something.
Sometimes it's not your partner who makes you have to use certain tactics to learn, it might be you. If you're much bigger or stronger than most people then make sure you don't always go to the top position, work on your guard and escapes back to guard. But don't make another classic mistake I see people doing in this situation; pulling guard then just jumping back to knees and driving someone over, or letting someone go to top side control then bench pressing them off. All these things prove are that you're stronger/bigger. Work on your technique, even if it means you can't escape. Don't give in to ego and kick back into hulk mode!
I can't cover off every possibility but I hope this gives you ideas. Except for people who are unsafe or unhygienic (who the instructor should sort out anyway) there shouldn't be anyone you avoid for any reason. Make sure you get something out of every roll!