No, it means if we were happy we would know how to live with ourselves...not other people. Ourselves is being used as a reflexive pronoun here that refers directly back to the subject we.If we were happy we would be able to live with ourselves, to exist within our beings, rather than needing to constantly have our attention focused outside ourselves.
--- Does it say that if we were happy we would know how to live with other people and exist withing ourselves rather than ...
To (not) be able to live with oneself is an expression, more often used in the negative, in my opinion.
If you say you can't live with yourself, in most cases you have done something to hurt someone and you're going to feel really bad for a long time; you're having a hard time forgiving yourself, and it will be quite a while until you will be able to enjoy any substantial degree of inner peace and contentment...at least until you've done something to make things right. For example:
Susan and I had a terrible fight last night, and I said some very mean, hurtful things to her. I just feel awful. I've got to apologize, because if I don't I won't be able to live with myself.
So in your sentence, the author is saying that if we were happy, we would be able to live with ourselves; we would be experiencing such joy and contentment that we would not feel the incessant need to focus our attention on other people and things, presumably in a vain effort to "find" happiness.
Or something along that line.
Hope this is clear.
Student or Learner