That's what a Square Up ruler is for. They don't have too many markings and make it easy to center whatever block you are trying to square up.
Yes, you can use any ruler that fits and has the 45 degree angle from the corner. But, the Square Up rulers have only the markings you will need to use.
ali