Yes, "holding on to the past" means much the same as "dwelling in the past," but are slightly different.
"Holding on to the past" almost always has negative connotations, often used when someone will not move on in his or her life from a lost love or the death of a loved one. It is usually tied to a regret of some sort. Imagine a parent whose child died 20 years ago but who still maintains the child's room in the same condition as the day they died, or a man who often pores over old love letters from a woman who long since left him.
I can make up a sentence in which "hold on to the past" is not used in this longing, regretful way, but it's fairly unusual. Imagine someone upset about the pace of change in life, they might say, "We must hold on to the past or all of our traditions will be lost." That's not the norm, by any stretch of the imagination, but it is possible and would be idiomatically correct.
"Dwell in the past" can have either negative or positive connotations. It can mean the exact same thing as "hold on to the past" but it can also be used for a person who cherishes his or her past in a positive way. Imagine a former sports star who relishes their earlier prominence. It would also be a reasonable phrase to describe the mental state of someone who is suffering from dementia and whose mind really does inhabit an earlier time in their life.