Quantum simulation of a general anti-PT-symmetric Hamiltonian with a trapped ion qubit