You could create the temp table first with an identity column
CREATE TABLE #tempFullRows (lifecycleid int,ZPartID int,ZLC int,ProccessingDate date
, [Row_Number] int identity(1,1));
then use
insert into #tempFullRows (lifecycleid,ZPartID,ZLC,ProccessingDate)
select lifecycleid,ZPartID,ZLC,ProccessingDate from
(
select m.lifecycleid, m.ZPartID,m.ZLC,m.ProccessingDate
from parts.LifeCycleMaster m inner join #TempLC t on m.ZPartID=t.ZPartID and t.status is null
union all
SELECT lifecycleid, ZPartID,ZLC,ProccessingDate
FROM #arrangeHistory
)as tempdata
As an aside, don't use SELECT * in UNIONs - list the columns you want in the order you want to avoid issues if table structures change - especially temporary tables. And do you really want union ALL - which will include duplicates