In order to clarify things, here are the basics:
If Player "A" shares a car:
-Player "A" can still use that car online without un-sharing it.
-Player "B" can borrow that car and use it A-Spec, B-Spec or offline practice.
-Player "B" cannot use that borrowed car online. If attempted an error message appears that says you're not allowed to use a borrowed car online. It doesn't matter if you're in Player "A"'s lounge, Player "B"s lounge, someone else's lounge or a public lobby.