The trick to renaming is to press the "Accept" button afterwards. And you talk to the Beast Vendor (the NPC to the right) to train and give your pet elemental attacks.