Regarding the original question, both are equally bad, in their own way. Using align="right" is deprecated, and therefore shouldn't be used, but using class="alignright" or style="align:right" is also a poor solution. By doing this, you are still not separating contents from layout, you're just using a different technology to do the same as you would have done in the past.
CSS classes and ids should always be named according to their use, never according to how you want it to look right now. If you at some point want to change the image to be left-aligned, you will either have to change the class in the document, or change a class called alignright to aling things left, which will only confuse upon future updates.
The solution would be to name the class e.g. articleimage, or something else which describes what the image actually is. If you need some variation, you can apply a secondary class.
Regarding references to images, making absolute references in the text to an image's location on the screen is a bad idea. There are a number of different factors which can change the appearence, including user-defined style sheets, text-based browsers and (perhaps most importantly) screen readers. If a user can't see the image, referencing a location only obvious to users who can see the image will make it a lot more difficult to get the context.
Why not use the method used in scientific articles, and reference figure numbers?
A recent poll showed that the number of polls has seen
a significant increase during the last five years. As seen
in <a href="#polltrend" id="polltrendback">figure 1</a>,
the number of polls in 2010 is expected to double from
the 2008 estimate.</p>
<img src="images/polltrend.png" width="300" height="200"
alt="Number of polls from 2003 to 2008, with projection
for 2010. 2003: 100. 2004: 120. 2005: 150. 2006: 190.
2007: 220. 2008: 280 (estimated). 2010: 560
<a href="#polltrendback" class="documentreturn">Back</a>
Figure 1: Polls are estimated to double from 2008 to