At the heart of the (relative) pricing theory is the concept of no arbitrage and replication. I'll focus on equities here because as stated in the comments it may be more complicated for commodities.
Forwards deliver a payout linear in the future value of the underlying asset. Hence they can be replicated statically by a simple cash & carry replication strategy (REM: this is where the argument gets more elaborate for commodities such as electricity or perishables). Using the absence of arbitrage argument yields the famous $$F(0,T)=S_0 e^{f T}$$ where $f$ reflects the cost of funding the equity purchase and carrying it (borrowing cash + having the equity in your balancesheet, placing the stock in repo + reinvesting the divs to decrease the overall cost).
This term structure of funding cost $f(t)$ (i.e. it is clear that $f$ is not constant in practice), also factors in when pricing non-linear products such as options, since their pricing equations also stem from some replication principle - this time dynamic instead of static - where one purchases the relevant quantity of stocks to replicate the target instrument's behaviour. If you assume proportional dividends and no jumps, then the risk-neutral dynamics of an asset writes:
$$ dS_t/S_t = f(t) dt + \sigma(t) dW_t $$
or equivalently
$$ dS_t/S_t = \frac{\partial \ln\left(F(0,t)/S_0\right)}{\partial t} dt + \sigma(t) dW_t $$
So you see that the forward curve indeed intervenes. You could therefore see the market forward prices as a way of extracting the implied funding cost and hence (partly) marking your model to the market. This is independent of the volatility model used $\sigma(t)$ (it could be BS, Heston, Local volatility à la Dupire). Of course if there is arbitrage opportunities or the above argument fails to apply, everything breaks down.
Mathematically, this is also understandable as follows: the forward curve characterises the first moment of $S_t$ under the risk-neutral measure knowing the current information, so obviously it'll intervene somewhere when pricing since it's part of the characterisation of the pdf of $S_t$. If you assume BS, then adding the volatility surface to the forward curve gives you the full representation of the future distributions of $S_t \vert S_0$ under the risk-neutral measure. This is enough for European options but not for some more exotic options (e.g. forward starts) that depend on the conditional densities $S_{t_2} \vert S_{t_1}$).
Regarding your question:
But do futures prices on the market have any effect on option prices in the model. It seems to me that S=Fe^(r-d)T is just a theoretical equation by no-arbitrage. Do futures actually follow this equation?
You could actually say the same about European options (quoted using the BS model for instance). You should see it the other way around: these are inputs that allow you to calibrate your model so that you could apply relative valuation principles afterwards, that is, some sort of ketchup economics: knowing that basic building blocks are priced at X in the market, I know some combination of these blocks should be worth Y in my model.