All humans produce the enzyme lactase in early life to allow them to digest their mother's milk.
Individuals who carry the T allele of the lactase persistence gene are able to produce lactase for their whole lifespan. Those who lack the T allele (CC genotype) will gradually lose the ability to product lactase at some point in their life, however it is not possible to say exactly when this ability will be lost. Therefore, it is possible to lack the T allele, but not yet have lost the ability to tolerate lactose.
Furthermore, there are some gut bacteria that can help people to digest smaller amounts of lactose even a person does not produce the lactase enzyme themselves.