You can get contributions back if you leave within a certain period - used to 2 years I think , or maybe one year- but I thought you had to request it within a certain period. And you only get your contributions back- not the much larger contribution your employer makes, and there is a tax/NI deduction. It's worth checking it with the scheme.
I think for the teachers scheme to pay any benefits you have to have been in for 2 years.
I'm not sure the union will help as you haven't been a member for so long but there's no harm in asking- however they cannot get the scheme rules overridden