I've become friends with coworkers at every job I've been at. Most of the time when I leave that is pretty much it, but I've also retained some of those friendships for years now (one particular friend I go out with at least once a month still). Another group of friends from several jobs ago I try and meet up once a year at a particular conference we all attend - no, we aren't terribly close anymore but once we are back together it is like old times again.
In summary, I don't think there is any need to create "rules" on such things. Some people might become friends with their coworkers and some might not. Social bonds are important, and there is no need to try and draw lines on which bonds are appropriate or not - everyone is capable of deciding this for themselves.