IF THIS WAS HAPPINESS A Biography of Rita Hayworth. By Barbara Leaming. Illustrated. 404 pp. New York: Viking. $19.95.

The most famous image of Rita Hayworth, erotic icon of the 1940's, is a pinup photograph in which she is kneeling on a rumpled bed, wearing a dark satin-and-lace nightgown; her head is turned over her shoulder and she is facing the camera directly. The pinup, published in Life magazine in 1941, is a fascinating study in contradictions. Seeming to offer her body, Hayworth also appears to be keeping her real self in mysterious reserve.

As an actress, Hayworth is best remembered as Gilda in the film of the same name, peeling off long black gloves in a self-absorbed striptease. But the most haunting image in Barbara Leaming's biography of the movie star, ''If This Was Happiness,'' is one of a fat, silent 12-year-old girl sitting on the front porch of her house and staring straight ahead, too terrified to play with other children. Margarita Carmen Cansino grew up with a sickening, isolating secret: her father was sexually abusing her. Her mother - probably the only other person who knew about it - slept in a bed with the child in a vain attempt at protection. According to Ms. Leaming, her father's abusive treatment was the key to her emotional development and led to a lifetime of disastrous relationships.

In 1927, Eduardo Cansino, a Spanish-born flamenco dancer whose work in vaudeville was admired by Fred Astaire, moved his young family from Brooklyn to California. A failure in films because of his poor English, Cansino began taking his daughter, Margarita - or Carmen, as he called her - out of school to dance as his partner on casino stages in Tijuana. Telling people she was his wife, he dyed the child's hair black, put scarlet lipstick on her mouth and dressed her in garish, sexy clothes. The ''roly-poly'' 12-year-old obediently flashed her eyes and tantalized. The sexual abuse continued in private. Cansino further exploited her by introducing her to movie producers such as Joe Schenck, who gave her a screen test that led to work as an ethnic extra in films being shot in Mexico.