My understanding is if I am taking a narcotic of any kind, I do not consider myself sober, because of the mind-altering aspect (side effect?) of narcotics. Tylenol and Advil are non-narcotic, and so would not compromise my sobriety.
But each person really defines their own sobriety, because, really, no one else cares what we do!