My lecture notes said that:
You cannot have two (or more) ideal voltage sources connected to the same pair of terminals.
Why is this so?
In effect you have a series circuit composed of two voltage sources of voltages $V_1$ and $V_2$.
The net voltage in the circuit is $V_1 \pm V_2$ depending on the orientation of the voltage sources.
Being ideal voltage sources there is no resistance in the circuit and so the current in the circuit would be infinity.
To only time that this is not so is if the voltage in the circuit is such that $V_1 - V_2 =0$ when the current would be zero.
This is when the positive terminals of the two voltage sources are connected together as are the negative terminals of the two voltage sources and the two voltages of the two voltage sources are the same.
This last arrangement is sometimes used with batteries so that a larger current can be provided to an external circuit.
It is not a recommended as the voltage of the two batteries are unlikely to be the same.
The batteries will also both have some source resistance.
Ideal voltage sources maintain a fixed potential difference between their terminals regardless of what other elements are in the circuit, and regardless of the amount of current drawn.
So if two or more unequal ideal voltage sources are connected in parallel between points A and B, the PD between A and B will have more than one value at the same time. This is impossible in classical physics because it defies the law of conservation of energy : a charge could gain energy by taking one route from A to B and another route from B to A, arriving back where is started with more energy than it had initially.