That's a pretty cryptic error message.
But it probably comes from doing things in the wrong order.
Analytic functions are last in the pipe.
So try using a CTE like this:
WITH CTE AS (
SELECT ROW_NUMBER() OVER(ORDER BY C_CODE) rn
FROM Tbl_Doc_Stock_Chem_Add_Mst
WHERE N_Type=1
AND C_Code LIKE 'sa%'
)
SELECT 'D05503' + cast(rn as varchar) Somenumber
FROM CTE