As you suspected, it is a powder flask. Made of either brass or copper, its is for a civilian arm, as it lacks a martial theme (decoration). These were very popular in the 1840's-1860's era. I have only dug one; have a couple of originals that I have bought over the years; and have been using a reproduction when firing some of my reproduction black powder firearms for many years.
Based on the picture, yours is missing the measuring spout. Can't tell, do you have both sides of the flask?
A very cool find. I think that you have a site that you might want to go back to and do a little more detecting.