Civilian vessels (such as private yachts and sailboats) have been known to fly the jack of the nation of their homeport, also from a jack staff, while moored or at anchor.
The practice of displaying a vessel's home port flag while docked or anchored is common for civilian boats like yachts and sailboats.