Do you want to export objects inside Inkscape as PNG. Say, you have 3 rectangles in 3 layers in file 22.svg
$ inkscape --export-type="png" --export-id="rect10;rect12;rect14" --export-id-only 22.svg
It doesn't matter which layers ( I presume) just get the Object IDs right and use it in the above command. My attempt was successful.
Export layer / objects as PNG in Inkscape, free, command line, CLI