Yes, it's a bayonet. It looks like it was also used as a civilian knife. The blade has been shortened and has seen a lot of use, as the edge looks very worn.
I've uploaded more photos showing it cleaned, along with additional information. Based on my research, I'd guess it's from World War I, but I could be wrong.