Yup. Unless there was a bill of sale, the brewery still owns the keg. When you "buy" a keg of beer, what you're buying is the beer, and the brewery is leasing you the keg. You pay a security deposit on it, and if you fail to return the keg, they keep your deposit, but considering the deposit is only like $30 and new kegs cost $120, they lose out pretty good on the deal.
Paying the security deposit doesn't mean that you purchased the keg though; you just paid a penalty for not returning the keg. It's the same thing like checking out a book at the library, never returning it, then paying the fee (which I realize, in modern times, few people understand that analogy). The library still owns the book, as they were the ones that purchased it.
In theory, if the brewery ever found your keg, they could legally repossess it. They never will, but at the same time, kegs are getting harder and harder to find because people are keeping them and breweries are more hesitant to replace them.