You posted in the classic Nano category. Is that really your board? a genuine one?
to your question, Yes, you if you have a genuine classic Arduino Nano, you can power through the VIN pin, and simultaneously connect it to a computer via USB. The Nano has an onboard voltage regulator that prevents back-feeding from USB to the external power. When both sources are connected, the Nano will draw power from the source with the higher voltage, usually the external supply if it’s above 5V, while the USB can still be used for programming and serial communication.
Make sure the external voltage is within the safe range (we often see 9 V for VIN) and make sure you don't power the rgb led ws2812b through the Arduino. The power must go directly from then power source (may be with a 5V adapter) to the LEDs (see The Magic of NeoPixels | Adafruit NeoPixel Überguide | Adafruit Learning System)
You must find the schematic of your clone to check if it's safe. For an official Arduino Nano it is safe to connect 5V and USB at the same time; see this part of the schematic
my setup is 180 led ws2812b which need around 3 to 4 amps and must power the led’s, the arduino and to upload the new sketch in the same time. One solution I found is to cutoff 5v from usb cable . but maibe is not necessary to hack the cable
Hi, @sz3bbylA
Construct yourself an isolation box.
Take a USB extension cable, cut it in half, then in the box connect the wires back together, EXCEPT, the 5V wires.
Bring the ends of the 5V wires out to terminals so if you need to feed 5V from your PC to the Nano, all you need to do is connect the terminals.
This is my cable, used many times on independently powered Arduino controllers.