Though it struck me as an impertinence for a dinner theater to attempt "The King and I," Harlequin's genuinely affecting production compels admiration.

The decisive factor is Mary Ellen Nester as the spirited Victorian widow who sails off to Siam to be governess and friend to the children and wives of its earnest, perplexed king. Nester has beauty, a pleasing voice and, above all, style, in the part Gertrude Lawrence made unforgettable. It is a compliment to both that Nester allows one to recall Lawrence with no diminution to herself.

Soon to wind up its astonishing three-year full-scale revival with Yul Brynner as the King he had created while a virtual unknown, this musical's strength lies in Oscar Hammer-stein's dramatization of Margaret Landon's memoir and Richard Rodgers' melodic, evocative score. "Whistle a Happy Tune," "Hello, Young Lovers," "Getting to Know You," "Something Wonderful," "The March of the Siamese Children" and that lilting "Shall We Dance?" from one of the top five R&H scores.

With but six musicians, Harlequin's music director, Hampton King, achieves sounds which suit its intimate setting, and the design of Linda Skipper and costumes of Arnold S. Levine suggest the gentle Thai artistry with delicate definition.

Director Dallett Norris, who substituted intimacy for the pageantry of "Camelot" in the same theater, now achieves a like effect, relying on accomplished voices and performances to convey the several stories. William Raulderson's King is well above adequate, as in Debby Hauptman's Lady Thiang. Victoria Casella, as the unwilling concubine, and E.G. Brockman, as her young lover, are vocally and visually appealing indeed.

There are other assurances: Robby Adams and Paul Dorin, who alternate with Will Gentry and Russell McClain as the major children and, however miniaturized, "The Little House of Uncle Thomas" ballet, with Vicki Riddleberger as Eliza.

But Nester's grace and charm tip the scales from an earnest endeavor to one well worth the trip.