This is the fourth paper in a series in which we attempt to put constraints on the flattening of dark halos in disk galaxies. We observed for this purpose the HI in edge-on galaxies, where it is in principle possible to measure the force field in the halo vertically and radially from gas layer flaring and rotation curve decomposition respectively. As reported in earlier papers in this series we have for this purpose analysed the HI channel maps to accurately measure all four functions that describe as a function of galactocentric radius the planar HI kinematics and 3D HI distribution of a galaxy: the radial HI surface density, the HI vertical thickness, the rotation curve and the HI velocity dispersion. In this paper we analyse these data for the edge-on galaxy UGC 7321. We measured the stellar mass distribution (M = 3 x 10(8) M(circle dot) with M/L(R) less than or similar to 0.2), finding that the vertical force of the gas disk dominates the stellar disk at all radii. Measurements of both the rotation curve and the vertical force field showed that the vertical force puts a much stronger constraint on the stellar mass-to-light ratio than rotation curve decomposition. Fitting of the vertical force field derived from the flaring of the HI layer and HI velocity dispersion revealed that UGC 7321 has a spherical halo density distribution with a flattening of q = c/a = 1.0 +/- 0.1. However, the shape of the vertical force field showed that a non-singular isothermal halo was required, assuming a vertically isothermal HI velocity dispersion. A pseudo-isothermal halo and a gaseous disk with a declining HI velocity dispersion at high latitudes may also fit the vertical force field of UGC 7321, but to date there is no observational evidence that the HI velocity dispersion declines away from the galactic plane. We compare the halo flattening of UGC 7321 with other studies in the literature and discuss its implications. Our result is consistent with new n-body simulations which show that inclusion of hydrodynamical modelling produces more spherical halos.