If they can only hide when no one can see them, like anyone else, that's not a situation unavailable to other creatures.
If B is lurking behind A, and C turns the corner, can C see B?
I take it that the general answer is Yes. Hence, in general, B cannot hide.
If B is a halfling, though, then B gets a DEX check. (Whether the check is made when B firsts starts lurking, or when C turns the corner, strikes me as mostly an issue of table handling, though in an action economy context a given table might want to establish some sort of standard practice to avoid unfairness/disputes.)
Mutatis mutandis if B is an elf and A is rain.
Hiding in B's circumstances is not something that anyone can do.
Conversely: if you think that
anyone is entitled to a DEX check remain unnoticed behind a friend; or that
anyone is entitled to a DEX check to remain unnoticed in rain, then you will not want to run things as I just described. (You might take this different view if you just carry over 4e's hiding rules to 5e, because in 4e light obscurement is enough to remain unnoticed; but [MENTION=6787503]Hriston[/MENTION] has persuaded me that 5e differs from 4e in this respect.)