나을 is the -(ㅇ)ㄹ ending form (representing the future or potential) of 낫다 (better, superior).
낫다 conjugates irregularly by dropping ㅅ before a vowel. (나아, 나으면, 나은, 나을, 낫지만, 낫더라도).
-(으)ㄹ 뻔 하다 means "could/might have ..." in English.
With a verb, it means you might have done something or had something happen to you (often a bad thing, like an accident), whereas with an adjective, it is like "could/might have been (better, worse, etc). It means "almost did" in the sense of "came close to doing something by mistake/accident (but was able to avoid it)", not "almost finished something".
it is always used in the past tense form to talk about what might have but actually didn't happen.
As for your example,
그냥 우리끼리 하는 게 나을 뻔 했어요. = [그냥 우리끼리 하는 것이] {나을 뻔 했어요}.
= {It might have been better} [to just do it by ourselves].