There doesn't seem to be an explicit line in the rules for when to use them. The only mention in the rulebook is in Rule 2:
SECTION 2 - SUPPLY
Each team will make 12 primary balls available for testing by the Referee two hours and 15 minutes prior to the starting time of the game to meet League requirements. The home team will also make 12 backup balls available for testing in all stadiums. In addition, the visitors, at their discretion, may bring 12 backup balls to be tested by the Referee for games held in outdoor stadiums. For all games, six new footballs, sealed in a special box and shipped by the manufacturer to the Referee, will be opened in the officials’ locker room two hours and 15 minutes prior to the starting time of the game. These balls are to be specially marked by the Referee and used exclusively for the kicking game.
If a team were to line up in punt formation, and had a K-ball, and then shifted to a non-punt formation (or ran a fake punt), that would be legal, as far as I know. I don't know if they can line up in non-punt formation, then change to a punt formation; my guess would be the presence of the punter is what triggers the K-ball being used, but it's just a guess.
The more interesting question is, whether a team who knows they intend to fake can request a non-K ball (and can do so without being obvious to the defense). That isn't clear in the rulebook, though I wouldn't be surprised if it were covered in the official's supplements (which aren't available online, I don't think).