Is it possible to get pregnant while taking the yasmin contraceptive pill?

Yes it is possible. Birth control only protects you against a 98% chance of pregnancy so there is still a 2% chance of pregnancy occurring.