Can a ninja learn a jutsu that lies outside of their own alignment?
It is not impossible, but it is rather difficult to do so. All Jounin level ninjas have to master more than two elements. Kakashi can perform 3 different element jutsu: Lightning, Fire, Earth. Yamato can do Earth and Water. Sasuke can do Lightning and Fire.

Even if someone has a natural inclination towards one element (Sasuke towards Fire), they can still perform other elemental jutsu (Sasuke can perform Chidori, a Lightning Release).