A PHB Beast Master Ranger cannot have their Animal Companion take non-Attack Actions
The Player's Handbook version of the Beast Master is pretty explicit about what their companion can or cannot do:
The beast obeys your commands as best as it can. It takes its turn on your initiative. On your turn, you can verbally command the beast where to move (no action required by you). You can use your action to verbally command it to take the Attack, Dash, Disengage, or Help action. If you don’t issue a command, the beast takes the Dodge action. Once you have the Extra Attack feature, you can make one weapon attack yourself when you command the beast to take the Attack action.
So it will take Dodge unless you direct it to take one of the Attack, Dash, Disengage, and Help actions.
Swallow is not one of those actions. While it does involve the use of an attack, it's the same as how spells like Booming Blade or Green Flame Blade are not the Attack Action (which would otherwise make them eligible for use with Extra Attack or other similar features) but do involve making Melee Attacks as part of their action.
Ink Cloud is in a similar situation. It's not an attack, so your companion cannot use it.
Conversely, Actions like Bite make it explicit at the beginning of their description that they are (after errata) a "Melee Weapon Attack", or for some creatures' attacks, a "Ranged Weapon Attack", which makes them explicit attacks.
An Unearthed Arcana: Revised Ranger of the Beast Conclave would be able to direct their Animal Companion to take these Actions
The animal companion loses its Multiattack action, if it has one.
The companion obeys your commands as best it can. It rolls for initiative like any other creature, but you determine its actions, decisions, attitudes, and so on. If you are incapacitated or absent, your companion acts on its own.
These are some very substantially different restrictions than what the Beast Master Ranger is permitted. For this version of the class, there aren't restrictions placed on what Actions the companion may take, except that it may not use its Multiattack feature if it has it. So if the companion has an Action like Swallow or Ink Cloud, it would be perfectly capable of using these features.
There is a caveat though: by default, you're limited by which animal companions you may have, as a Beast Conclave Ranger:
With 8 hours of work and the expenditure of 50 gp worth of rare herbs and fine food, you call forth an animal from the wilderness to serve as your faithful companion. You normally select your companion from among the following animals: an ape, a black bear, a boar, a giant badger, a giant weasel, a mule, a panther, or a wolf. However, your DM might pick one of these animals for you, based on the surrounding terrain and on what types of creatures would logically be present in the area.
The language is permissive, and many DMs would probably permit other animal companions, much like the normal Beast Master Ranger, depending on where you are and how you try to summon them. But by default, you wouldn't have access to a Giant Frog or an Octopus, and none of the creatures enumerated by the entry have unusual Action abilities.