You don't assume a sign of the acceleration. The sign of the acceleration arises from the coordinate system you choose to use and the relative magnitudes of the forces.
Let's say that upwards is positive and downwards is negative. Let's call the masses $m_1$ and $m_2$ for this, which will make keeping track of each mass easier. A diagram of this is shown below.
You are right in assuming that each mass experiences the same magnitude of tension upwards$^*$, and the weight of each mass acts downwards. It is always helpful in problems like these to draw free body diagrams of each object. Diagrams like these can help us write out the net force on each object to use in the equation for Newton's second law.
Therefore, for each block, Newton's second law looks like this:
Now, due to how the masses are linked, it must be that $a_1=-a_2$ (since if one goes up the other goes down. This can also be "derived" if you consider the fact that the length of the rope connecting the masses must be constant). For simplicity let's say $a_1=-a_2=a$. Then we can change our equations to be
Solving for the acceleration we find that:
Now, let's say $m_1>m_2$. Then we see that $a<0$. Now remember, $a=a_1$ is the acceleration of block $1$. Therefore, if block $1$ is more massive, it accelerates downward (in the negative direction based on our coordinate system). You can apply a similar argument if $m_1<m_2$. Notice how we did not assume anything about the sign of the acceleration. The sign came out of applying Newton's laws to the problem with our defined coordinate system. This is the best way to approach the problem, since in more complicated systems you might not actually know which way things are going to move at first.
It seems like it would also be helpful for you if we solved for the tension in the string as well:
If $m_1>m_2$ (block $1$ goes down and block $2$ goes up), then we see that
So we do see that in fact tension is large enough to lift the smaller mass. We can do a similar argument to show that the weight of mass $1$ is larger than the tension.
Therefore, we have two different ways to show that the larger mass will move down and the smaller one will move up.
$^*$ Having the tension magnitude as the same for each mass depends on two assumptions. First, if we assume the pulley is massless and frictionless, then a net torque is not needed to rotate the pulley. Contrast this with the case of a pulley with mass where each tension needs to be different in order to rotate the pulley. Second, if we assume the rope is massless, then the rope does not need to support its own weight. This means the tension will not depend on the height of each mass.