The incident occurred at an address in Morley Road at around 11pm on September 9, 2021.
Jack Burns, from Lancaster, of no fixed abode, broke into the victim’s property before sexually assaulting her as she lay in bed.
The 24-year-old was sentenced at Preston Crown Court on Monday (April 11).
He was handed a seven-year sentence after previously pleading guilty to sexual assault and burglary.
Burns was jailed for five years and given an extended licence period of a further two-years after a judge ruled him to be a dangerous offender.
He will also be placed on the sex offenders register for life.
Det Sgt Hana Alayli-Moore, of Lancashire Constabulary, said: “I am satisfied with Burns’ sentence and hope it sends a message that we will not tolerate this type of crime in Lancashire.”