How much latitude do priests have when exercizing “pastoral discretion” when giving guidance to people? For example, is it okay for a priest to tell at couple that it is okay to cohabit so long as it is their intention to get married soon?
If the priest is advising them that it is okay to fornicate as they cohabitate, even though they plan on getting married “soon” (which is rather ambiguous), then, no, it is not okay for a priest to do this.
If the priest is advising them that it is okay to cohabitate in separate bedrooms when their wedding is immediately imminent (in the next month or two) because of some extraordinary circumstances, then it might be okay for a priest to do this. It would be okay provided the advice is adequatley qualified (i.e. no sex!), and provided the reasons are serious enough to warrant it.
To answer your general question, priests are granted a great deal of latitude when exercising pastoral discretion, provided their advice does not contradict Church teaching. Simply put, they should never do that.