I am getting an unlocked AT&T branded phone online for a good price but it has Jelly Bean. Would I be able to upgrade to KitKat or Lollipop through AT&T ?
That's how it's done. AT&T sends updates to AT&T phones that are on AT&T service. (IOW, if you were using it on TMobile, you;d have to manually update it with an AT&T file you downloaded - probably from XDA.)