There are two separate issues: work authorization, and the validity of the I-140 petition. The rule you are referring to is about the validity of the I-140. If your company filed an I-140 petition for you to immigrate, and you leave that company with no intention of working there later, the company will withdraw the I-140. Usually, the company withdrawing the I-140 will invalidate it (and any I-485 Adjustment of Status filed on the basis of that will also be denied). The rule you are referring to makes it so that if you have an I-485 pending for over 180 days, then the company withdrawing the I-140 does not invalidate it, if you continue to work in a similar job. Thus you can continue to immigrate on that I-140, without the new company filing an I-140 petition for you.
Of course, you will still need to somehow be authorized to work for the new company in order to work for them legally. This rule does not change anything about that. Usually, people who have gotten an EAD from their pending I-485 can use that to work, without needing their company to get a worker status for them. Or, the company can petition the person for some kind of worker status like H1b, if possible, and the person can work on that. On what basis you will be authorized to work for the new company is something for you and the company to figure out.
(And if you are self-petitioned, like EB1A, then the rule doesn't matter to you at all, since you are not going to withdraw your own petition. I didn't want to assume that just because you are on O1 that you would be immigrating in EB1A.)