Check out Irojo's link.
And it is possible to do with memblocks as well - though a bit slow unless you use a DLL for real time rotation. Part of the trick is to use a matting in the image rotation. If you rotate the image say 45 degrees, the corners will point N S W E and there will be "spaces" where the image was. If you fill these spaces with zeros (black) you can set them to transparent. Also, the size of the image can change with rotation. In your rotation algorithm, you can squish it as it rotates, you can crop it - chop off the parts that are rotated out of the size of the original image, or you can expand it (in which case you'd need a second memblock to write the new data to.
Once you have the rotation done, make an image from the memblock and use this new image for the sprite.
Another way is to capture the rotations using a 3d object ahead of time as images - similar to the link to the code snippets:
rem 3d capture to 2d sprite rotation illusion
rem by latch
rem 09/27/2007
sync on
sync rate 60
`autocam off
rem make a cube with a couple of arms
make object cube 1,25
make object cylinder 2,25
make mesh from object 1,2
for lmb=1 to 2
add limb 1,lmb,1
scale limb 1,lmb,30,200,30
color limb 1,lmb,rgb(rnd(255),rnd(255),rnd(255))
next lmb
rem cleanup
delete mesh 1
delete object 2
rem position the limbs
offset limb 1,1,13,0,0
rotate limb 1,1,0,0,90
offset limb 1,2,-13,0,0
rotate limb 1,2,0,0,270
rem black screen camera looking slightly down
color backdrop 0
position camera 0,50,-200
sync
rem capture images
for n=1 to 360
text 0,0,"Capturing image : "+str$(n)
yrotate object 1,wrapvalue(object angle y(1)+1)
get image n,230,205,400,300
sync
next n
rem switch to 2d
delete object 1
backdrop off
cls RGB(70,70,70)
sync
do
text 0,0,"Now the 2D sprite!"
for n=1 to 360
sprite 1,100,30,n
sync
next n
loop
Enjoy your day.