On the first click, your mouse cursor will have the icon for the first stack attached to it, but it's still a mouse cursor. You can move this around the screen and still click on things, including the inventory page numbers. It's a little more difficult, since the item icon kind of gets in the way, but the page numbers are big enough that it's not a problem. This is also how you move things from page to page to keep some kind of sane inventory scheme going (e.g., all materia on page four).

If the items are on the same inventory page, I'm pretty sure you can also just drag one to the other (click and hold and then let go instead of click then click again).