My poor Dakota

Ok so I have a 01 extended cab 2 wd Dakota with the 3.9 v6 and 255000 miles.it is/was my daily/beater and I love it....So mu daughters 97 towne car broke a ball joint and I let her drive the Dakota while I was fixing her car..She called me one day and said it lost oil pressure (again) I put new oil pump in about 30000 miles ago......long story short it still runs sometimes with oil pressure most times without,always with lifter noise and bearing rattle(not knock)So here is my question.Should I pull the v/6 and do a major rebuild or opt for a junk yard 318.I am told all I need is the engine and v/8 computer............what say you???? I am on here almost daily and valu all opinions...............................................Jeff P.S. Did I mention I LOVE this truck