It is easily done, especially in a stress situation. I know it wasn't the case in your situation but two cars meeting suddenly on a single track road you naturally pull to your own side. But if that's the wrong side!
I worked in California for a spell and every morning, as I drove through the motel car park, I had to remind myself what side of the road I was going to pull out on. One night I was driving back from a friends farm, along a fairly wide single track road, and I suddenly realised I was very close to the grass. I was keeping to the left of the carriageway.
My biggest problem was sitting in the front, and being driven. Felt very odd not having a steering wheel in front of me!