Non-Hermiticity-induced wave confinement and guiding in loss-gain-loss three-layer systems