Even if there is an affine open $U$ around $0$, the map $g$ there will not exist if the relative tangent space along the identity section is not globally free over the base ring $A$ there. That is one reason you are rightly confused about transporting intuition/experience from the theory over a field to the situation over a ring.
Let's give a direct proof that after passing to the case when the base $S$ is affine, say Spec($A$), the formal completion of $E$ along the identity section is naturally a 1-parameter formal group over $A$ provided that the relative tangent space along the identity section (which is always an invertible $O_S$-module, as $E$ is $S$-smooth with pure relative dimension 1) is globally free, as can always be arranged by initial further Zariski localization on $S$. This is essentially an elaboration on the comments of Emerton and ACL.
Consider the zero scheme $E_n$ of the $(n+1)$th power of the ideal sheaf of the identity section. This is a quasi-compact separated scheme over $A$ with a quasi-coherent ideal $I$ satisfying $I^{n+1} = 0$ such that the zero scheme of $I$ is affine. It follows from Serre's cohomological criterion for affineness and devissage that each $E_n$ must be affine, call it Spec($R_n$). By design, we have $A$-algebra surjections $R_{n+1} \rightarrow R_0 = A$. For a flat scheme, the ideal sheaf of a section is flat and its formation commutes with base change (this is immediately reduced to the affine setting, where it follows from the Tor$^1$-vanishing argument). In particular, by descent to the noetherian setting and compatibility with base change we see that over general $A$ the ideal $J_n = \ker(R_{n+1} \rightarrow R_0)$ is $A$-flat and finitely presented with $n$-dimensional fibers, so it is a rank-$n$ vector bundle over $A$.
More specifically, we arranged that $J_1$ is globally free of rank 1 (it is $A$-dual to the relative tangent space along the identity section, which we arranged to be globally free of rank 1, not just invertible), so if we choose a generator $T_1$ of $J_1$ and pick compatible lifts $T_n \in J_n$ for all $n$ then the $n$ elements $T_n^i$ for $1 \le i \le n$ generate $J_n$ on geometric fibers over Spec($A$) by the theory over fields, so since $J_n$ is a rank-$n$ vector bundle it follows that these $n$ generators must be an $A$-basis of $J_n$. Thus, we have built compatible $A$-algebra isomorphisms $$A[T]/(T^{n+1}) \simeq R_n$$ for all $n \ge 0$, so this identifies the formal completion $\widehat{E}$ along the identity with ${\rm{Spf}}(A[\![T]\!])$ (using $T$-adic topology).
This pro-represents the functor $$(B,J) \mapsto \ker(E(B) \rightarrow E(B/J) = E(A))$$ on augmented $A$-algebras $(B,J)$ with some power of $J = \ker(B \twoheadrightarrow A)$ equal to 0, and since this is a group-valued functor it follows that $\widehat{E}$ acquires a structure of formal group over $A$, where the relevant fiber product is completed tensor product (as that pro-represents the fiber product of functors on the category of augmented algebras with nilpotent augmentation ideal). In other words, we acquire what is classically called a formal group law on $A[\![T]\!]$ in the usual sense.
The discussion of these matters in Hida's book is an elaboration on the early parts of Chapter 2 of the book by Katz and Mazur. The relationship between global relative 1-forms (necessarily translation-invariant) and global bases of the relative tangent space along the identity is very well-explained in section 4.2 of the book "Neron models" for smooth group schemes over any base scheme.