Yes, it is possible to use the genitive apostrophe + s with names of cities and countries.
If you say 'The weather in Beijing is...', we'd expect you to continue by telling us what the weather is like today.
If you say 'Beijing's weather is...' we'd expect a more general description of the city's climate. The possessive links the city and the weather more closely together, so we'd expect to hear about the particular kind of weather that 'belongs' to Beijing, if you like.