Animals on British railways
To tackle the legal question first, animals were allowed on British trains when the books take place (1991–97).
The May 1991 edition of the Ticket Examiners’ Handbook  states that passengers were subject to additional charges for:
Dogs, cats and other small inoffensive animals or birds
Since Harry first goes to Hogwarts in 1991, these rules would have been in effect throughout the books.  Broadly similar guidelines are still in force today.
This means that it wouldn't have been flagged by a stationmaster. A member of the public might have been curious, but the British have a long tradition of tutting about such things and then never saying or doing anything about it.
That was the easy bit.
: This was written by the British Railways Board, who governed British railway services until 2001. I remembered the vague details from old conversations with my grandfather (a rail enthusiast), and found the quote from Wikipedia.
: I'm not certain that a new edition wasn't published between 1991 and 1997, but I'm fairly sure any such edition would have had broadly similar rules about animals.
Why didn't anybody notice?
This is a bit fuzzier.
Obviously, there are enchantments in place to stop Muggles accidentally finding Platform 9¾. You don't want a Muggle to lean on the barrier and accidentally fall through. (Or, for that matter, to stand in its general vicinity and prevent people going through.) Perhaps these extend to the students.
As for why nobody noticed the hundreds of students milling around with animals and trunks and goodness knows what else, there's a very simple answer: people are idiots. Stan Shunpike pointed this out in Prisoner of Azkaban, referring to the Knight Bus:
“[Muggles]!” said Stan contemptuously. “Don’ listen properly, do they? Don’ look properly either. Never notice nuffink, they don’.”
Other pointed references to Muggle ignorance are made throughout the books (St. Mungo’s, Muggle baiting, etc.). Chances are, most of them are too wrapped up in their own little world to notice another commuter with some strange luggage. Animals are not the strangest thing you'll see on the railway.
Some other suggestions:
- Plenty of people at King's Cross would be commuting around London. This is a journey they take every working day. A lot of them will be on autopilot as they move around the station, and strange things won't cross their gaze.
- When you see something strange, it's often easier to assume that you're mistaken than to accept the truth of what happened. Our minds will work against us to avoid telling us impossible things. (cf. Harry releasing the snake in the zoo, the Dursleys)
- Hogwarts terms run for months at a time. Even if a Muggle noticed something strange one day, the next day things would be back to normal. It's easy to forget it as a one-off, and by the time it happens again, you've forgotten about the last time.
Finally, our ignorance of strange things around us is corroborated by science; it's not just HP. I won't find any studies, but just state that it's well known that we miss things if we're not looking for them (such as a pack of kids in funny clothes carrying animals). If you haven't seen this before, go watch this British cycling ad and try it on yourself.
And today? All the Muggles would be glued to their phones, and walk straight past them. ;-)
ETA: that explains why most Muggles don’t notice anything unusually, especially if the students are careful. But the Pottermore article about King’s Cross Station (transcript) confirms that occasionally somebody slips up and gets noticed, and explains what’s done to preserve secrecy:
There have been minor problems over the ensuing years, such as witches and wizards who have dropped suitcases full of biting spellbooks or newt spleens all over the polished station floor, or else disappeared through the solid barrier a little too loudly. There are usually a number of plain-clothed Ministry of Magic employees on hand to deal with any inconvenient Muggle memories that may need altering at the start and end of each Hogwarts term.