It depends. If the external USB controller supports the whole set of ATA commands you can find out if the drive attached is solid state or not. See the following post for several ways to determine if your drive attached is solid state or not.
How to determine if a drive is Solid State via Terminal
Though the driver in macOS is very limited, macOS has this ability to identify the drive attached. The second part that’s required for this to work is the USB to SATA bridge (the chip in the enclosure) must provide this capability. Many off brand vendors use chips that only provide read/write functionality because they are substantially cheaper than quality chips that support more functions.
You can see this in smartmontools (excellent utility for monitoring drive SMART status via the command line) USB support wiki where they state to support USB they need:
- The USB bridge provides an ATA or NVMe pass-through command.
- The operating system provides a SCSI pass-through I/O-control which works through its USB-layer.
macOS doesn’t support the pass through of the whole ATA command set (Why it’s limited) and thus you need a special driver for smartmontools. But if the USB device doesn’t suport it, theres no 3rd party driver that will give you this ability.