There is no such authoritative grammar rule that I know of: in line is idiomatic-- We waited in line. However, waited in a line is also possible, if less common; it might more likely refer to a situation where a lineup was not expected.
The head of the line in your passage now refers to the previously-mentioned line, so the definite article is called for.
Your third case is mistyped; it should read We’ve been waiting [at the head] of the line or We’ve been waiting in (the) line.
Student or Learner