As far as I can tell, during your electives, this does depend on the school, you can do them anywhere as long as you meet there minimum requirements. This can be in the states or out. It may be more of a problem getting slots out of the country.
Many schools do have programs that allow you to do elective rotations abroad. In fact, it is strongly encouraged at some schools. For an idea of the countries and type of rotations that are available check out www.amsa.org. They have a foreign study opportunities link in there somewhere. If you have questions about which schools encourage foreign rotations, ask while you are interviewing or when you are researching the schools to which you wish to apply.