Portably:
sed '
s/.*/ & /; # add a leading and trailing space
:1
s/\([[:blank:]]541[^[:blank:]]\{2\}\)\([^[:blank:]]\{5\}[[:blank:]]\)/\19\2/g
# replace in a loop until there is no more match
t1
# remove the blanks we added earlier:
s/^ //;s/ $//'
With `perl`, using look-around operators:
perl -lpe 's/((?<!\H)541\H\H)(\H{5})(?!\H)/${1}9$2/g'