The confusion likely comes from three facts:
- When used with redundant pronoun, indirect objects must necessarily be introduced with a (para rejects redundant pronouns).
- When a direct object is a animate (that is, a person or otheranthropomorphized being), it must necessarily be precedeed with the preposition a.
- The direct object pronoun may be either lo (most common) or le (animate male or usted, depending on region)
If you were to say that a bee stung John, you'd say:
Una abeja picó a José.
This makes us think initially that picar is a verb that takes indirect objects which would cause us to think we'd need le. There are two ways to prove that María is not an indirect object:
*Una abeja picó para José.
*Una abeja picó al globo.
Neither sentence works (and hence I've preceeded them with an asterisk, which means "not grammatical").
Now, given that we know it's a direct object, you'd expect us be able to write
Una abeja lo picó (a José).
Una abeja la picó (a María).
And this is in fact the most common way you would hear this in Spanish and probably what you're expecting after being told it's a direct object, but perhaps conflicting a bit with the fact that we've introduced José with a, which makes you think that le would be more acceptable.
But actually, in some regions, for people (like José), you can use le as a masculine animate direct object and so the following would be acceptable:
Una abeja le picó (a José).
Una abeja la picó (a María).
Una abeja le picó (a Vd. quien se llama José)
Una abeja la picó (a Vd. quien se llama María)
In other regions in you can't do it for José as 3rd person, but you can do it for either José or María directly as usted (called the leísmo de cortesía)
Una abeja lo picó (a José).
Una abeja la picó (a María).
Una abeja le picó (a Vd. quien se llama José)
Una abeja le picó (a Vd. quien se llama María)
Some regions even combine both types:
Una abeja le picó (a José).
Una abeja la picó (a María).
Una abeja le picó (a Vd. quien se llama José)
Una abeja le picó (a Vd. quien se llama María)
In no region can you use le for anything that's not a person (or similar, like a pet), regardless of gender, number, or person.
So ultimately... in your example of "si una abeja le pica…", depending on region, the le could ultimately be heard as ungrammatical, or as meaning him/you sir, or as meaning you sir/you ma'am, or as meaning him/you sir/you ma'am. Since you intend it to mean usted, le works fine — so long as you're in a region that accepts the leísmo de cortesía (which is actually larger than the region that accepts the leísmo for masculine animates, so most people will understand you fine in addition to it being accepted by the RAE as correct)