Technically, no, and it really depends on the environment and election type as to whether or not it's socially acceptable. In a school election, generally it's a good gesture to vote for the opponent, you'll get respect for it. In a real election however, voting for yourself is generally expected.