The assumption on the finite global dimension is just needed to have $Perf(A)=D^b(A-mod),$ which does not hold more generality.
It is indeed true that $Perf(A)$ has a Serre functor (given in the same way) when $A$ just is a Gorenstein algebra, that is the regular module $A$ has finite injective dimension as a left and right $A$-modules.
For example any selfinjective non-semisimple algebra (such as $K[x]/(x^n)$ for $n \geq 2$) is a Gorenstein algebra of infinite global dimension.
Good references are: "Representation Theory: A Homological Algebra Point of View" by Zimmermann and the book by Happel on Triangulated Categories.