Yes that's completely fine! My usual procedure in the spring is to use the old potting soil in the garden where the beds need a top up, then replenish the containers with fresh potting soil.
Just be sure as someone else mentioned, to mix it in with your existing garden soil.