It doesn't come pre-trained, but it does get the bonus tricks (obviously) and those can certainly include a General Purpose if you want them to and you have enough bonus tricks. Please note that a General Purpose is no different than the tricks that make it up except in terms of training time and effective check difficulty-- you get no benefit from choosing tricks that add up to a general purpose as bonus tricks. (There is a possible exception to this involving non-aggressive herbivores and combat training, but it's complicated).
Pushing an animal commands it to do a trick it isn't trained for but can perform, and is DC 25 (+2 if it's hurt). Because you are a ranger pushing your companion is a move action, v.s. the free action for handling it.
There is nothing in the 5e rules (at least that I'm aware of) that either allows or prevents the acquisition of a non-combat non-magical pet.
That means that whether or not you can have a pet is completely and totally up to your DM.
As to whether or not there is a balance issue related to having a pet, I would not be very worried about it. It may occasionally provide a very small benefit (I'd maybe let it provide advantage once a day if I wanted something explicitly mechanical for it), but in general it's not going to be important and is merely a flavor element for a character.
That said, if you did want a mechanical element to a pet, the Find Familiar spell would be a good place to look to get a non-combat effective pet that does have some mechanical utility.
In summary, there's nothing in the rules that allows or prevents this, so consult your DM, but do so knowing that it's probably not going to be a mechanical concern (especially if it's spelled out explicitly that it can't be). If there is a need for more mechanical weight, then find familiar is a good model.
On the more general aspect, I can only speak to 4e, but it had a theme called Animal Master that gave you an animal companion that was basically just a vanity pet with a small mechanical benefit (you could use it to gain combat advantage once per day). It was a minion, so not very combat effective and was mostly a flavor piece with a minor benefit.
Best Answer
Handle Animal covers everything you need to know.
The Handle Animal skill allows the player to train animals to learn specific tricks and abilities as defined in the skill description, as well as handle them as pets. You can also teach general purpose commands if you want the animal to perform a specific role in the party.
-Core Rulebook, Skill Descriptions, Handle Animal (emphasis mine)
Ultimate Equipment also covers the general list of pets a player can purchase as well as their respective prices. Statblocks are not provided, but instead must be located in the Bestiary entry of the desired creature.