Can I use the expression: "You are out of line?!
Yes.
However, where I work, even someone who is in authority over someone else would be out of line to be shouting at an employee. It would be considered unprofessional and if a boss was truly shouting at an employee, the employee would have cause for complaint.
I'm not a teacher, but I write for a living. Please don't ask me about 2nd conditionals, but I'm a safe bet for what reads well in (American) English.