When in doubt, check the Item itself. It it says the Container is resealable, then you can carry it in your inventory. Not resealable Items can, as CT said, only be carried in your hands or they have to be emptied out before putting them in your inventory.
That said, maybe someone should add buckets with lids, for resealing. Those do exist, and they could come in handy.