Benjamin Mayo, writing for 9to5Mac:

Whilst HomePod works best with an Apple Music subscription, allowing users to ask Siri to play any of the 40 million tracks in the Apple Music catalog, it does not require a subscription to function. We have learned that the HomePod can play content purchased from iTunes, stream Beats 1, and listen to podcasts without needing a subscription.

If you add music to your home iTunes library that was not acquired through a purchase, HomePod will not be able to access it. It appears HomePod doesn’t have Home Sharing, which would enable that kind of feature.