Yeah, while some Pokeballs are stronger than others, catching a Pokemon is pure chance. Technically you could waste like a hundred ultraballs trying to catch a lillipup and still fail, and after that catch every legendary in the game using pokeballs. Though the chances are pretty thin, you can never be sure what is going to happen.