Popping pimples without proper preparation introduces bacteria that was sitting on the surface of the skin under the open skin of the popped pimple. This can lead to more pimples sprouting and even introduce infections under the skin, hence why dermatologists say not to pop pimples. However, if you know how to properly clean your skin, hands, and utensils, it should be okay to pop the surface-level pimples on your skin.
Properly sanitizing is the most important step, though. Alcohol swabs are probably the easiest to use, or you can get a bottle of isopropyl alcohol from your nearest drug store and douse a cotton ball or q-tip with it. Before even touching the pimple or your face, make sure your hands are clean with warm/hot water and soap, and even some hand sanitizer to make sure as much bacteria is gone as possible. Then clean the area the pimple is in with the alcohol pad or cotton ball, and get to work. Since you sterilized the area, less bacteria should be present on the skin when you open it up.
After getting everything out that you need to, be sure and clean the area again to make sure any bacteria on your hand doesn’t get into the pimple (it’s going to sting so be ready) and cover the fresh wound with a pimple patch. With this technique, you at least ensure the area is clean and there’s no germs pooling into your skin. Once the pimple is completely gone and the patch is in place, it should keep moisture off the spot and allow it to heal properly.