Can an element have variable oxidation states in a compound?

Take propanoic acid for example. If I assign oxidation states to the 3 carbons in it using the idea that the more electronegative element gets all the electrons in the bonds it makes, the 3 carbons get -3( the one in the CH3), -2( the one in the middle), and +3( the one in the acid group). 


Is this conclusion correct? The reason I doubt is that all the examples we've ever been given in class, we've assumed all the atoms of the same element to have the same oxidation state. 


