Most machines I’ve seen that tell you what to hold do use the proper strategy, but the better the paytable, the less likely the machine will be to offer advice in the first place. And I’ve never seen a machine with a positive expectation that told you what cards to hold.
As for the accuracy of the advice -- Microgaming Internet casinos do follow optimal video poker strategy. However I’ve played some machines at a racetrack in Delaware that advised the player on which cards to hold, and the advice was clearly incorrect.