Is it essential to spend time alone to get to 'know thyself' and does truly knowing yourself/knowing God make loneliness impossible?
You don't need to live alone, or become a monk to know yourself, but you will need to spend some time in a practice that gives you that experience of your essential nature. So in that sense you may need a schedule that allows you meditation time to become reacquainted with your true Self.
The process of self-realization is a private, internal experience that requires time and patience, and you need to find a lifestyle that supports that practice while upholding the other important dimensions of your life.
Once you have firmly established your self-awareness, then there can be no question of loneliness, because you know your essence as the essence of everyone and everything.