I cannot find a way to use the calculated values from geom_smooth in geom_linerange. If the main concern is to calculate the fit only once, I would store the predictions from the regression in the data frame and not use geom_smooth at all.
I modified my code a bit based on the answer you got on Stack Overflow.
library(ggplot2)
suppressPackageStartupMessages(library(dplyr))
set.seed(1234)
df<-data.frame(myx=1:10,myy=c(1:10)*5+5*rnorm(10,0,1))
lm.fit<-lm("myy~myx",data=df)
df <- df %>% mutate(PredValue = predict(lm.fit))
df <- df %>% mutate(ymax = PredValue, ymin = myy)
ggplot(df,aes(myx,myy))+ geom_point()+ geom_line(aes(y = PredValue))+
geom_linerange(mapping=aes(ymin=ymin,ymax=ymax))

Created on 2019-05-28 by the reprex package (v0.2.1)