For a couple of days the Russian had been coming, always with a tote bag. Once past the guards and inside the White House it was not to the Oval Office that the man was escorted but to the very heart of the free world: Ronald Reagan's own residence. There, the tall, gray-haired, balding man wearing glasses would set his tote bag down by the piano and out would jump his dog.

Now if you think this is a shaggy dog story, you are absolutely right, because what lay ahead was neither a rendezvous with destiny nor a date with detente but a piano "recital" by the dog and, just incidentally, a rehearsal by Nancy Reagan.

The Russian was the National Symphony's Mstislav Rostropovich, who will conduct the first lady's performance next Monday night with the orchestra when she narrates the Ogden Nash verses to Camille Saint-Sae ns' "Carnival of the Animals." The dog was Pooks, a miniature long-haired dachshund, for the past six years the maestro's constant companion; and, like any good pianist, Pooks needed no coaxing to the keyboard. She immediately jumped up on the piano bench and pawed out a tune. Of sorts.

"Pooks is very fond of modern music," an NSO spokeswoman said yesterday.

Like Mrs. Reagan, who scooped Pooks up in her arms when they met for the first time last week, Pooks has had a book written about her. It's the story of Pooks' "joyous life with a world famous conductor" and was written by Elizabeth Eisele, with pictures by Chris L. Demarest.

"Mrs. Reagan is waiting for her autographed copy," the first lady's press secretary, Sheila Tate, said yesterday.