I would advise one small change:
sol[k_?NumericQ] := FindRoot[Sin[x] + Exp[x] == k, {x, 0}];
Or even further
ClearAll[sol];
sol[k_?NumericQ] := Module[{x}, x /. FindRoot[Sin[x] + Exp[x] == k, {x, 0}]];
Then one can use sol[k]
in other functions:
NIntegrate[sol[k], {k, 0, 1}]
(* -0.276615 *)
Alternatively, one can use Block
:
Block[{k = 3}, FindRoot[Sin[x] + Exp[x] == k, {x, 0}]]
(* {x -> 0.819443} *)