Actually, that's bad advice in general, since at some pools they often actively check to ensure every guest, including children, have a corresponding room key for that specific resort.
It's always best to ask the front desk and the lifeguard, and be prepared to comply with whatever direction they give you, yes or no.