In Avatar the Last Airbender, I believe Aang ran away from the air nomads because he was told that as the Avatar, he would not be allowed to ever have a family; and his sole responsibility would be to protect the four nations. But in Legend of Korra, we find out that Aang and Katara were actually married and had three kids: Tenzin, Bumi, and Kya. So is the Avatar allowed to get married now and have a family?
According to the wiki entry on Aang, he actually ran away because he was going to be sent to Eastern Air temple to complete his training:
However, soon after learning that he would be sent to the Eastern Air Temple in order to complete his airbending training far away from Monk Gyatso, who other monks thought was too soft on him, Aang attempted to run away on his flying bison Appa. Shortly after running away, Aang and Appa were caught in a storm, crashing in the water and being swallowed by the waves. Aang saved himself and Appa while semi-consciously entering the Avatar State, freezing the two in a sphere of ice by using a combination of airbending and waterbending. The Avatar State kept him alive, albeit not fully conscious, in the iceberg for about a hundred years while the war raged on.
As far as him not being able to marry and have children: This may have been more to do with the time Aang was growing up and less to do with the "code of the avatar", after all, previous avatars had been allowed to have relationships, especially in times of lasting peace (avatar Kuruk is an example), but the Air Nomads knew about the coming war (the reason they began training Aang and telling he was the Avatar at a younger age was to prepare him for the coming war), and thus wanted Aang to focus on his training.
Shortly after the events of the Avatar series there where many years of peace, meaning that Aang would be able to settle down and marry without the worry of having to fight another war.
The only time that Aang's relationship with katara was threatened was when he trained at the (?) Eastern air temple with the Chi guru. He mentions for Aang's to be able to enter the avatar state at will he has to open all of his chakras - for going love in the process.
He eventually foregoes opening his chakras and ends up falling in love with katara.
And that's where Tenzin comes from. There was never an issue with the Avatar code, or being an airbender.
I believe you are confused.
It is in different canon The Last Airbender film that Aang runs away due to not being allowed to have a family.
Katara: Why did you run away?
Aang: The day they told me I was the Avatar, they said I could never have a normal life, that I could never have a family. They said it cannot work with the responsibilities of the Avatar.
In the show, Avatar: The Last Airbender, which The Legend of Korra is a continuation of, a completely different reason was given:
Aang: Then, just when I was feeling better, something worse happened.
Scene changes to flashback of Monk Tashi and Monk Gyatso speaking to Monk Pasang.
Gyatso: Aang needs to have freedom and fun. He needs to grow up as a normal boy.
Tashi: You cannot keep protecting him from his destiny.
Pasang: Gyatso, I know you mean well, but you are letting your affection for the boy cloud your judgment.
Gyatso: All I want is what is best for him. Pasang But what we need is what's best for the world. You and Aang must be separated! The Avatar will be sent away to the Eastern Air Temple to complete his training.
Aang is shown looking through a hole in the ceiling, shocked at the news that he just heard.
Katara: That's awful, Aang. I don't know what to say.
Aang: [Stands up.] How could they do that to me? They wanted to take away everything I knew and everyone I loved! [He activates the Avatar State.]
Katara: Whoa! Hot cinders!
Aang comes out of the Avatar State, walks to the fire, and sits down again.
Aang: I'm sorry I got so mad.
Katara: You have the right to be angry after the monks sent you away like that.
Aang: Well, that's not exactly what happened. [Flashback starts again, showing Aang looking out the window of his bedroom.] I was afraid and confused. I didn't know what to do.
Flashback shows Aang lying on his bed before changing to Gyatso walking to Aang's room.
Gyatso: Aang, I'm not going to let them take you away from me. Aang? [Gyatso is shown opening the door more, spotting the scroll, and opening it up. He gasps, and sees a storm coming outside the window.]
Aang: [Still in present, but flashback playing still.] I never saw Gyatso again. [Flashback shows Aang and Appa through the storm, and how Aang got into the iceberg.] Next thing I knew, I was waking up in your arms after you found me in the iceberg. Flashback shows Katara's face that was seen in "The Boy in the Iceberg". The flashback ends.
Katara: You ran away.
The mention of not being able to have family came from the film version of ATLA, which isn't canonically consistent with the cartoon series. Therefore, in the cartoon series, the prohibition may not be present.
Avatar Roku was shown to have a family.
It is possible that this is simply a subset of the airbender culture, but it is likely that airbenders have families (they need some way of reproducing and I don't think they would be cold enough to have reproduction without connection between the individuals involved)
There are no rules known saying Avatars cannot get married. There have been earlier Avatars in relationships (Kuruk, Roku) and later ones too (Korra). But there was another big problem why Aang had to start a family: he was the last Airbender. If he were to die the next Avatar would have no Airbending teacher, and four Avatars down the line (the next Air Avatar) could not be born and all sorts of nasty stuff could go down. Or not, this is not certain.
Even if, which we do not know for certain, there were rules against marrying amongst the Air Nomads I suspect that they would wave this away because of the whole "extinction of our people" and "unbalancing of the world" thing going on with Aang being the last Airbender.
This conflict also shows in his youngest son, Tenzin. He and Lin were a thing but Lin didn't want to start a family of her own (possibly becuase of her own family issues), but this was not an option for Tenzin. So he married Pemma and had four kids with her. This problem was kinda solved after Harmonic Convergence, but for the time being Tenzin keeps the new Airbenders together in one big group instead of splitting them by gender based on how the Air Nomads used to live before everything changed when the Fire Nation attacked.
Just gonna clear this up for you. Avatars themselves were allowed to have families. It was the air nomads who initially were against the concept. There were circumstances that made that an issue. Knowing of the coming dangers, the air nomads needed Aang to forgo all pleasures of the world and devote himself to becoming a fully realized avatar faster. The issue of marriage and love was a matter of a persons way of life. When Aang met with the guru who explained that to permanently have access to the avatar state he would have to give up love, that did not mean that avatars who chose love would be unable to achieve that avatar state. It meant that that was the way Guru knew and because Aang couldn't do that, he needed to find another way. Luckily, he was successful. Now going back to the air nomads and what we see of them, I believe that like many monks, they were not permitted to engage in physical pleaser and if they did, certain conditions had to be met. After all, it was obvious that air bender children did not stay with their parents. They were raised together by monks in their temples.