Proper conflict-free coloring of sparse graphs