I think Ocon, himself, would agree to a two-year deal if it guaranteed to keep him on the grid.
But I believe his contract would have to go through Mercedes, who would want Ocon available to them at any time (encase they don’t extend Bottas’ contract, or if any unfortunate injuries in the main line-up forced someone out of action).
And I doubt any team would want to agree to those terms at this time.
That said, I could see Williams go for it if (maybe) Mercedes agreed to do a straight switch between the two teams of Bottas for Ocon (in the case of a call-up).
But right now, I think Williams’ concern is income.
And for Mercedes, it might require a re-negotiation of Bottas’ contract (as it already has a 2nd-year extension ready).