Hmm, this is a weird one. I had a teacher I was really close to, he supported me and was there for me when I had to leave home at 15, (I even called him as I was walking away from my house and he organized somewhere for me to stay within an hour whilst comforting me over the phone) I had his phone number (which is a sackable offense) and he was always there for me, on call, and he did a lot of things for me (like buying 'thank you' cards for the teachers and friends' parents who let me stay at their homes) which would have been considered unprofessional, especially as we got on really well, but it was never anything unsavoury; he had a girlfriend who he lived with, and I knew her too. He was quite young and I think he allowed his own good nature to overtake his professionalism, but he really did help me so much from year 10 onwards, and I'm glad he did break the rules because his support saved me from going 'off the rails' too badly.
Sorry for divulging, got a bit carried away there! To the OP, if the teachers are cool enough that you'd want to keep in contact with them, then I expect they'd love to keep in contact. Just don't be hurt if they say no, because you know how teachers love their rules! Nah, joking, I'm sure they'll be chuffed you asked.