tl;dr: Yes, you may attack freely with either end of a double weapon, except when using Two-Weapon Fighting, where the offhand attack cannot be made with the same end as the main attack.
You may use any weapon you are wielding for any attack. You may choose which wielded weapon you use independently of the choice you made for any previous attacks; that is, you are never “locked in” to any particular weapon (or “locked out” for that matter, with one major exception explained below).
Choosing a weapon for an attack is not even a free action; it is a non-action component of the attack itself. There is not actually any point where you “change” which weapon you are using; each attack simply lets you choose a weapon, independently of any prior attacks you may have made.
Thus you may use a different weapon for each attack, or the same weapon over and over, or whatever. For double weapons, this means that both ends are available for any given attack. It does not matter if the previous attack was in the last round, or was an attack of opportunity just before your turn, or was a previous attack in a full-attack: the weapon you choose to use for this attack is completely independent of the weapon you chose to use for any previous attacks.
Note that choosing to use different weapons for each attack in a full-attack does not constitute using Two-Weapon Fighting. If you have multiple attacks for iteratives, haste, or whatever else, you may choose the weapon you use for each attack independently, and you take no penalty for choosing a different weapon than the last attack. You only take a penalty when you explicitly use Two-Weapon Fighting to get a bonus attack. This bonus attack is also the aforementioned big exception.
Big Exception: Two-Weapon Fighting
There is one major exception to the general case where you may use any wielded weapon: Two-Weapon Fighting (or Multiweapon Fighting). These combat options give a bonus attack, known as an offhand attack, but this offhand attack must be made with a different weapon than the main attack that it is paired with (and in the case of Multiweapon Fighting, a weapon different from any prior offhand attacks in the same set).
In other words, you are not free to choose a weapon you have already used when taking the bonus attacks offered by Two-Weapon or Multiweapon Fighting.
Double weapons explain that, as a special exception to the Two-Weapon Fighting rules, you may use the same double weapon for both attacks when using Two-Weapon Fighting, but they must be made with separate ends of the double weapon, and you take attack penalties as if you were wielding a one-handed weapon and a light weapon.
This is the only time where one end of the double weapon would not be available as an option for an attack: if you used an end as the main attack when Two-Weapon Fighting, the bonus attack must be made with the other end.
Also, note that you do not “have” one end as main and the other as offhand. The terms main and offhand are not used, and have no meaning, except during Two-Weapon Fighting. If you are not using Two-Weapon Fighting, it’s just an attack, not main or offhand or anything else. Two-Weapon Fighting and the main/offhand designations apply only during the full-attack in which you use Two-Weapon Fighting; as soon as that full-attack completes, both ends become equal again (including for attacks of opportunity during that round).