Yes. Although a unit cannot be displaced onto an occupied hex, it can displace or be displaced onto an invalid hex.
If you have a minion on an invalid hex, its next movement must use the fewest possible number of unoccupied hexes of any terrain to get to a valid hex, using the remainder of its movement to make progress if possible. If a hero finds itself on an invalid hex, it can only move off of it by moving onto a valid hex.