She said she had to go right away.

Literal

She [topic-は] immediately must-go [quotative-と] said.

A great example of conversational ellipsis: 行かなければ trails off mid-construction — the full form would be 行かなければならない or 行かなければいけない ('must go'). In speech, dropping the なければ part's tail and letting the listener fill in the obligation is extremely common, almost preferred for naturalness. The と quotation mark closes off the elided form as her actual reported wording, mid-sentence cutoff and all. The result feels urgent — she didn't have time to finish her sentence properly.