Judging by their conversation (as shared by Dave Filoni on Twitter), Ahsoka knew quite well that her life as she knew it would be over after the mission to Malachor.
Unbeknownst to us, Ahsoka met Bendu in the second-to-last episode of Season 2!
Of course, Bendu being Bendu, he didn’t explicitly say what would happen, but he said enough that Ahsoka was planning on confronting her former master one last time.
The little scene puts a whole new spin on the Season 2 finale.