The anteater came snuffling into the living room, following its long nose across the rug, sniffing at the guest's shoes, sniffing its way up the guest's leg and finally and happily bringing its nose to rest in a socially impossible position.

"Is it friendly?" asked the embarrassed guest, trying to slide away.

"Oh, very," assured the hostess, pouring out another sherry as her guest scooted back and forth from one end of the couch to the other, tracked by the amorous anteater.

The anteater was an unusual case, but no one has successfully defined the relationship that should exist between man and beast when the man is giving a party and beast decides to attend.

Take Waldo, the world's largest cat, whose disposition on a good day is grumpy and on a bad one furious. And any day when people come to clutter up the house is a bad one. Waldo has been seen climbing on the buffet table, attempting to stop guests from helping themselves to food that he views as his. At large and crowded cocktail parties, Waldo stretches his considerable length across the middle of the rug, keeping his turf clear of people as much as he can.

On the other hand, Boom Boom the Samoyed loves a good party and when put in the yard, or locked in an upstairs bedroom, eats everything in sight to show how upset he is about not being invited. Boom Boom gets a lot of invitations that way, and if he occasionally snatches the contents off someone's plate, his owner feels better a bit of pate' than a purse.

Most hosts do make some attempt to keep animals from bothering guests and most guests make at least a pretense of finding Fido a fine fellow. There are, of course, people who are allergic to animals or who are truly terrified of even the smallest terrier--conditions that should be explained to a host or hostess when accepting an invitation.

Although most pet owners find it easier to entertain when the dog is safely stowed away in the backyard or an upstairs bedroom, that assumes you have an upstairs bedroom or a backyard, and that it isn't raining and that the dog isn't going to spend the lonely evening howling in protest.

Given life's imperfections, all too often when the party happens, so does the pet. Therefore, some guidelines on the proper behavior between man and his furry friends.

* Guests should assume that the dog or cat is there because it's loved. Shoving it rudely away or making disparaging comments will offend the hostess no matter how much they pretend otherwise.

* The host/ess, however, should not let it come to that point. No one who is dressed for a party wants to be lept on, shed on or drooled on. When the dog cozies up or the cat lands on a lap, remove them. If a guest is flattered by the attention, he can ask that the animal be allowed to stay.

* If you are the owner of a dog who greets guests with bared teeth and throaty growls, arrange to have the dog go out for the evening. Board him for the night if necessary, or ask a friend to babysit, or buy him a ticket to "The Lady Is a Tramp." No amount of assurances that "he's just being friendly" will keep people from feeling uncomfortable.

* Brush the cat to keep it from shedding. Bathe the dog. Candles, flowers and blanquette de veau will avail nothing if the overwhelming odor of the evening is dog.

There is another way to handle the people/pet problem, one chosen around the turn of the century by Mrs. Stuyvesant Fish. She gave a dinner and invited not 100 of her friends, but 100 of their dogs.