An Ore extension over a polynomial algebra F[x] is either a quantum plane, a quantum Weyl algebra, or an infinite-dimensional unital associative algebra Ah generated by elements x,y, which satisfy yx−xy=h, where h∈F[x]. When h≠0, the algebra Ah is subalgebra of the Weyl algebra A1 and can be viewed as differential operators with polynomial coefficients. This paper determines the derivations of Ah and the Lie structure of the first Hochschild cohomology group HH1(Ah)=DerF(Ah)/InderF(Ah) of outer derivations over an arbitrary field. In characteristic 0, we show that HH1(Ah) has a unique maximal nilpotent ideal modulo which HH1(Ah) is 0 or a direct sum of simple Lie algebras that are field extensions of the one-variable Witt algebra. In positive characteristic, we obtain decomposition theorems for DerF(Ah) and HH1(Ah) and describe the structure of HH1(Ah) as a module over the center of Ah.