Certified GKH Gardening Expert
The tree form of the Hydrangea will do fine in a container for a limited time. Maybe two or three years before it will need to be placed in ground. Almost all varieties of hydrangea will need extra protection in your area to grow outside.
Many of the smaller shrub forms and climbing forms can stay in container for extended periods with some maintenance.
This article will help: https://www.gardeningknowhow.com/ornamental/shrubs/hydrangea/hydrangea-container-care.htm