Is there a way to have layer imported into an Indesign document from another separate INDD file (contents intact with paragraph and object styles) upon running a script?
Yes, this is possible, but it is quite a bit more involved than you might think, since you also need to determine the source page(s) and target page(s), as well as figuring out if layers should be merged or renamed in case they have the same name as a layer already in the target document. Lastly the script needs to determine at which position in the stack the layer should be positioned (or at least make a decision to always put it on top or something).
Depending on what you need to do it might be easier to just select all elements of the layer (easily with one click in the layers panel) and then just copy them and paste them in the new document and rearrange everything else as needed.
You can use this script: https://redokun.com/blog/indesign-copy-entire-layer-one-file-another
It copies both styles and content.
Edit: Now it also works with threaded text frames