Handedness is definitely an inherited thing. My Dad taught me to write, to tie my shoelaces, and any of the sporty things I might do (like playing catch). He is left-handed, I am not. My handwriting was known for being atrocious when I was a kid and writing by hand was always very difficult for me until some right-handed teachers started to help. My shoelaces still wind up tied upside down.
There is a gene for left-handedness that has been discovered and links in with how people seem to use their brains/how their brains are wired (which relates to the next part of your question).
Brain imaging has shown certain connections between certain emotions and functions in the brain and where the brain is "on" or firing while completing certain tasks of feeling a particular emotion. While things are far more complex than outlined in this article by National Geographic on the matter, the article simplifies things to say that, for example, emotions are felt in the right side of the brain and speech and language are controlled by the left in right handers. A left-hander's brain is reversed from the right-handed so the structure of the brain is definitely different. How this all boils down to answering your question is, No left-handedness, or ambidexterity cannot be learned in the whole and purest sense of things. It isn't just about what hand you use for writing, but about the way the brain is wired.
Having said that: I injured my right hand badly when I was in college. The skin over it got shredded and a a few ligaments were severed. It was expected to heal, but I was told I would never be able to use it for fine-motor skills again and that I should learn to write, paint, etc. with my left hand. This was before laptops were affordable and when only the wealthiest had them so I was stuck taking notes in class etc. to the best of my ability with my left hand (I also got a mini tape-recorder, but listening to the tapes over and over again to find a note was cumbersome). I learned to write left-handed and I learned fast. My left-handed writing was certainly as good as my right-handed writing had been in third or fourth grade. I'm sure if I had continued writing with my left hand, it would have continued to improve further.
My hand has actually healed and I have much more complete use of it than expected
and as soon as I could hold a pencil with my right hand - even though it was painful, I went right back to using it instead of the left because it was easier. I'd imagine any skill could be like that - if someone really wanted to be able to bat left-handed, with tons of practice, they could probably learn even if they are right-handed. They may not ever be quite as good left handed as right handed, but they could learn. The question is, is it worth the time and effort? In most cases, probably not.