As the title says, can I sell Battlefield 3 on the PC and still play it with my Origin account whilst the buyer of my game buy an online pass and also play on his own account?
There is no online pass for the PC version of the game. The online pass is for the console versions of the game (PS3/360). The online pass is a charge imposed on people who buy the game used and/or share a copy with a friend. Since you need the disc to play, selling the disc means you've sold the game.
In the PC case, there's just a key, and the key represents the game. There is no way to re-use or transfer this key once you've purchased it and added it to your account. If you gave your friend the disc, and that friend then bought another key, they'd be effectively be buying the game again. You're not transferring anything to them. The disc that you have for the PC version is essentially a relic of another era - the game can be downloaded directly from Origin once it is added to your account, disc or no.