Hi, there. I'm happy to give my 2 cents on this.
For this particular type of question --- the least number to ensure, to guarantee without a shadow of a doubt, then basically, yes, you have to consider the "worst case scenario", as you correctly did.
I will point out, though, this is not a very common GMAT question type --- in fact, I'm not sure I have every seen a question like this in any of the official material I have reviewed.
A much more GMAT-like question would be --- what's the probability of picking a blue and a yellow pill when you pick two pills? More challenging prompts -- (a) Pick two pills: what's the probability that they are different colors? (b) pick three pills: what's the probability that they are three different colors? Those are prompts that more resemble what I have seen in official material.
Does all this make sense? Let me know if you have any questions on what I've said.
Magoosh Test Prep