Path-integral description of combined Hamiltonian and non-Hamiltonian dynamics in quantum dissipative systems