A regularity criterion for 3D ideal density-dependent MHD system