I mean that $B$ is a Dedekind domain with fraction field $L$, which is a finite separable extension of a field $K$ that is the fraction field of a PID $A$ such that $B$ is the integral closure of $A$ in $L$.
If the question in the title is true, one can give a new proof of the unique factorization property of Dedekind domains like the proof for number rings given in Hecke's classical book "Lectures on the Theory of Algebraic Numbers."
EditEdit: R. van Dobben de Bruyn havehas given an ingenious counterexample in the comment below.