I did a google search on this "duff" term and the results as to its origin and spelling were most interesting. This information is taken from the Phrase Finder: http://www.phrases.org.uk/meanings/397300.html
Up the duff
Meaning
Euphemism for pregnant. Used most commonly, although not exclusively, to describe unplanned pregnancy.
Origin
The phrase doesn't appear in print until 1941 Sydney John Baker's 'Dictionary of Australian Slang':
" Duff, up the (of a woman), pregnant."
Duff isn't a common word and seems an odd choice for a colloquial phrase. It took a rather roundabout route...
As the phrase means pregnant it shouldn't come as a major surprise that for the origin we need look no further than the penis. As with many English phrases that refer to sexual activity we dive straight into a world of euphemism and there are several obscuring layers here between penis and pregnancy.
One of the numerous slang terms for the sexual organs, or more commonly specifically the penis, is pudding. This has a long history, going back to at least the 18th century, as here from 1719:
Thomas D'Urfey, 'Wit and mirth: or pills to purge melancholy, being a collection of ballads and songs 1719':
"I made a request to prepare again, That I might continue in Love with the strain Of his Pudding".
A slang term for male masturbation, which leaves little to the imagination - 'pull one's pudding', has been known since at least the 19th century.
There is a related phrase for pregnancy - 'in the pudding club', and it turns out that this and 'up the duff' are essentially the same phrase. By 1890 Barrère & Leland, in their Dictionary of Slang, defined the term pudding club:
"A woman in the family way is said to be in the pudding club."
Note that in Victorian times a definition of a euphemistic term for pregnancy relied on another euphemism.
Dough is another word for pudding and duff is an alternative form and pronunciation of dough. That was in use by 1840, as here from R. H. Dana in Before the Mast:
"To enhance the value of the Sabbath to the crew, they are allowed on that day a pudding, or, as it is called, a ‘duff’."
So, we travel this route - (up the) duff -> dough -> pudding -> penis -> pregnant.
The more recent 'bun in the oven', another slang phrase for pregnant, may originate this way too.