It is proved that if a ring is left hereditary, left perfect and right coherent, then the stable category has cokernels. Moreover, we show that the condition for a ring to be left perfect and right coherent is also necessary for the stable category to have cokernels, provided that the ring is left hereditary and satisfies the additional condition that there are no non-trivial projective injective left modules over it (satisfied, for instance, by integral domains). This, in particular, implies that, for a Dedekind domain, the stable category has cokernels if and only if the domain is left perfect. Several new necessary and sufficient conditions for a left hereditary ring to be left perfect and right coherent are found. One of them requires that the full subcategory of projective modules be reflective in the category of modules. Another one requires that any module be isomorphic to a stable module in the stable category. Yet another equivalent condition found in the paper requires that, for any module $M$, among all representations $M=K\oplus P$ with a projective $P$, there should be the one with the smallest $K$. To accomplish the goals, a version of the well-known Freyd's adjoint functor theorem, where the solution set condition is removed under some additional conditions on the categories, is given.