For flights passing over Pakistan, the ATC will only check if the flight is on it's expected path (as such away from any no fly zones) and then ask it to lower or increase the altitude so it won't interfere with local flights coming to land in Pakistan. That's a standard procedure. Generally planes not landing in that region, are required to fly higher than those landing or taking off. Pilots know this and ATC knows this.
The only case where ATC can force a change of heading and altitude is when there is an emergency and airspace needs to be cleared or there is an unexpected aircraft like a fast moving military aircraft.
This is why aircrafts have transponders that communicate the heading, speed, altitude etc of the plane to the ATC on the ground and other aircraft in the vicinity.
Take a case of a stealth aircraft. If it's flying in civilian airspace, it has transponders to relay where it is so that people on the ground and in the air know where the aircraft is as radar cannot pick it up due to low RCS. Obviously not in combat missions.