A city is located east/north/west/south of a country; what is the correct Chinese grammar for that?
A在B的东边 has two meanings，one meaning is that A is inside of B, another could be outside of B. 

The first one can be stated more clearly as: A在B的东部，and the second one as A在B的东边上（也可用：A在B的东面）。

However, if you say A在B的东边，most Chinese will judge which mean by the context or by further questions. So you do not need worry too much