일부러 has same meaning with "deliberately", "intentionally"
In terms with the sentence "추억이란 덫에 일부러 발을 들여놔", This is very literature way of wrighting. As above mentioned, this is the lyrics from K-pop. Anyway though it is hard job to let you understand fully, but basically this expression implies following intention or meaning: Intentionally he is willing to tread into the trap of reminiscence relating his lover, because whenever it rains, he is very missing for her.