I think this is a good question, I wish I understood more deeply how things work in a more general setting. Anyway here's what I can tell you:
If $\langle \cdot, \cdot \rangle$ is an inner product (positive definite)
Yes, it is true that a map $f : V \rightarrow V$ (say ${\cal C}^1$) whose tangent mapping preserves the inner product everywhere (in other words a Riemannian isometry) must be an affine isometry of $V$.
Here's a sketch of proof (maybe there is a more direct proof, I'm not sure):
(1) $f$ preserves the lengths of piecewise-${\cal C}^1$ paths
(2) therefore $f$ preserves distances between points
(3) therefore $f$ is an affine isometry.
(1) is immediate by assumption on $f$ and the formula giving the length of a ${\cal C}^1$ path: $L(\gamma) = \int_a^b \Vert \gamma'(t) \Vert dt$
(2) is an immediate consequence of (1) and the following fact: the distance between two points $x$ and $y$ (given by $d(x,y) = \Vert x - y \Vert$) is the minimum of the length of all piecewise-${\cal C}^1$ paths between $x$ and $y$. In two words, this fact is proved as follows: it's true that the length of a polygonal path between $x$ and $y$ is greater than $d(x,y)$, this is a consequence of the triangle inequality. Then approximate a ${\cal C}^1$ path by polygonal paths.
(3) After taking a couple compositions with translations, we can assume that $f$ fixes the origin. By (2), $f$ preserves the norm on $V$ ($\Vert f(x) \Vert = \Vert x \Vert $ for all $x$) and thus the inner product too (by the polarization identity). It follows that $f$ is linear: given vectors $x$, $y$ and a scalar $\lambda$, check that $\langle f(\lambda x + y) - \lambda f(x) - f(y), v \rangle = 0$ for all $v$ and conclude.
If $\langle \cdot, \cdot \rangle$ is skew-symmetric (i.e. a linear symplectic structrue)
Then no, it is not true that any map $f : V \rightarrow V$ whose tangent mapping preserves the linear symplectic structure everywhere (in other words a symplectomorphism) must be an affine symplectic automorphism of $V$.
Take a look at dimension $2$. A symplectomorphism of $\mathbb{R}^2$ is just an area-preserving map. There's tons of those (most of which are not affine). Here's an example that comes to mind "geometrically": take any function $t : \mathbb{R} \rightarrow \mathbb{R}$ and let $f(x,y) = (x, y + t(x))$. Check that $f$ is a symplectomorphism of $\mathbb{R}^2$.
Comments
Here's a natural question: in the first case, where exactly did we use the fact that $\langle \cdot, \cdot \rangle$ is an inner product? Well,
- We used non-degeneracy to show that "$f$ preserves $\langle \cdot, \cdot \rangle$ implies that $f$ is linear"
- We used symmetry for the identity polarization
- We used "positiveness" for the triangle inequality
I think the result is still true if we drop the "positiveness" condition (while keeping non-degeneracy), in other words if we are talking about isometries for a flat pseudo-Riemannian metric on $V$. But I'm not sure how one would prove it.
Comments about the failure for the symplectic case: differential geometers are familiar with the fact that there are a couple of key differences between Riemannian and symplectic geometry. Here's one: all symplectic manifolds of the same dimension are locally isomorphic (see Darboux's theorem), while Riemannian manifolds have local invariants such as curvature. As a result, in contrast to the Riemannian case where the group of isometries of a Riemannian manifold is always a finite-dimensional Lie group, the group of symplectomorphisms of a symplectic manifold is always very large. For example, you can produce a lot of symplectomorphisms by taking the flow of Hamiltonian vector fields. In more elementary terms for our problem: take any function $f : V \to \mathbb{R}$. Let $X_f$ be the symplectic gradient (or Hamiltonian) of $f$, i.e. the unique vector field always satisfying $\langle X_f, v\rangle = df(v)$. Then the flow of $X_f$ is a one-parameter family of symplectomorphisms of $V$.
I'd like to finish this long-winded answer by extending the scope of the question a little bit: let $G$ be a subgroup of $GL(V)$. Let's call it a rigid group if the following holds: any map $f : V \to V$ that fixes the origin and whose differential $df_x$ at any point $x\in V$ is an element of $G$ must be an element of $G$ itself. Under what conditions is $G$ a rigid group? We've seen the cases where $G$ is an orthogonal group or a symplectic group. Here's another example: when $G$ is the group of similitudes of $\mathbb{R}^2$, we are talking about holomorphic functions. Of course this is one way to extend the question, there are probably more relevant and interesting ways to do it.