As Thomas Aquinas declared in the title of one of his most famous essays, "Sic et Non". Many aspects of chemistry feature classifications that are taught as definitively affirmative or negative, but in reality they show blurred lines of demarcation. Thomas Aquinas wrote his essay on theological questions, but the same answer might apply to such chemical questions as whether certain basic compounds are alkalies -- and whether and how electrons are conjugated into delocalized pi systems.
The formal lone pair on nitrogen either is or is not conjugated into the pi system of aniline. Wikipedia describes the ambiguous, intermediate situation:
The amine in anilines is a slightly pyramidalized molecule, with hybridization of the nitrogen somewhere between sp³ and sp². The nitrogen is described as having high p character. The amino group in aniline is flatter (i.e., it is a "shallower pyramid") than that in an aliphatic amine, owing to conjugation of the lone pair with the aryl substituent. The observed geometry reflects a compromise between two competing factors: 1) stabilization of the N lone pair in an orbital with significant s character favors pyramidalization (orbitals with s character are lower in energy), while 2) delocalization of the N lone pair into the aryl ring favors planarity (a lone pair in a pure p orbital gives the best overlap with the orbitals of the benzene ring π system).[1][2]
Of course, aniline definitely shows aromatic character experimentally, for instance in its proton nmr spectrum, but that does not mean there must be only six conjugated pi electrons confined to the ring. Alternatively, including the nitrogen "lone pair" into the conjugation would put the molecule outside the scope of the $4n+2$ rule because that rule applies only to an exact ring of conjugated pi electrons. Given this limitation on the $4n+2$ rule, aniline could be aromatic whether the nitrogen lone pair is conjugated or not.
Cited References
1.
Alabugin, Igor V. (2016). Stereoelectronic effects : a bridge between structure and reactivity. Chichester, UK. ISBN 978-1-118-90637-8. OCLC 957525299.
2.
Alabugin I. V.; Manoharan, M.; Buck, M.; Clark, R. J. "Substituted Anilines: The Tug-Of-War between Pyramidalization and Resonance Inside and Outside of Crystal Cavities". THEOCHEM, 2007, 813, 21-27. http://dx.doi.org/10.1016/j.theochem.2007.02.016.