No. Apple Music is strongest inside the Apple ecosystem, but it is not restricted to Apple hardware. It also works on Android, on the web, and across a range of third-party devices and platforms.
The reason this misconception survives is that Apple Music does have a clear centre of gravity. Its strongest case is still people who already use iPhone, AirPods, Apple Watch, HomePod, CarPlay, or other Apple services as part of everyday listening, which is why people reduce it to a narrower stereotype than it really deserves.