The earliest citation I can find is Marion Harland's Alone (1856), but I don't suppose it's an "origin".
Free, white, and twenty-one" sang Emma, cheerily. "Twenty-one! In four years, I shall be a spinster of a quarter of a century!"
The fact that it was well-established long before OP's 1930s movies is attested by this sentence in the Transactions of the Annual Meeting from the South Carolina Bar Association, 1886
And to-day, “free white and twenty-one,” that slang phrase, is no longer broad enough to include the voters in this country.
There were still black slaves in some states in the mid 1800s, so obviously being free and white was a meaningful part of "I can do what I want and no one can stop me". But unless it refers to the "freedom" to vote, I don't know what the significance of reaching 21 would have been at the time.
Get lost! dates from at least 1944 in popular media, and in speech is likely to pre-date this somewhat.
1945
Here's a 1945 in the script for Anchors Aweigh! by Isobel Lennart, also a 1945 film:
AL: Squeaky, get back out there and... and... look for thugs.
JARVIS: Thugs, your--?
AL: Am-scray, Squeaky. Get lost. (JARVIS EXITS RIGHT)
1944
It shows up in Billboard, 15 April 1944:
Class?
NEW YORK, April 8--A society gal, breaking in a new role as secretary in one of the local agencies, informed her boss that a certain performer wanted to see him.
"I'm too busy," said the percenter. "Tell that jerk to get lost."
The socialite - secretary went back and told the actor, "Mr. So-and-So is busy. He says for you to get lost."
Snippets of I Never Left Home (1944) by Bob Hope (snippets can have incorrect metadata, but this seems correct):
If I picked a nice parlay of three or four out-of-line cracks to hand to the whole British press, the American Embassy might suggest I get lost.
And from the same book, perhaps literal, but perhaps a Bob Hope half-joke:
It was like breaking sticks to get lost. The population doesn't help you much, either. They want you to get lost. And stay lost. To them everybody on the road they don't know is a probable Nazi spy.
Another possible 1944 is in Best stories of modern Bengal, Volume 1 by Dilip K. Gupta:
"Then that's all right. Tell her to get lost again." Brindaban said, "To tell the truth, that's what Haripada also would prefer. Oh, the scandal! It'll just be complete if she turns a prostitute! Then Haripada won't be able to show his face in Calcutta! Even some of his friends will visit her!"
1942
"Let's Get Lost", a torch ballad by Frank Loesser and Jimmy McHugh (sung here by Lina Romay, but also by Jimmy Dorsey, and by Mary Martin in the 1942 film Happy Go Lucky, and later by Frank Sinatra), was popular in 1943 and often in Billboard's top ten. It goes:
Let's get lost, lost in each other's arms
Let's get lost, let them send out alarms
And though they'll think us rather rude
Let's tell the world we're in that crazy mood
Although not directly using the imperative idiom, I think it's suggestive of it and likewise helped popularise it.
Best Answer
The expression appears to be from the '40s, probably of Yiddish origin:
For real (adjective phrase)
For real (adverb phrase)
(The Dictionary of American Slang, Fourth Edition by Barbara Ann Kipfer, PhD. and Robert L. Chapman, Ph.D.)