Pretty easy to find the center of balance on a rifle. Balance the rifle (sans magazine) on your forefinger or a wooden dowel or the like.
Once you find the location of the center of balance for your rifle, you can get some kind of indication of whether the location of the optic will shift weight to the front or back of the rifle. It may improve the balance, make it worse, or do nothing at all.
We do this a work with heavy machinery. We place a large metal rod (Solid steel, 4" in diameter) on the floor and set the machinery on the rod with an overhead crane. We keep adjusting the rod under the machinery until it balances (or nearly balances). Customers need to know the center of gravity on our machinery when they go to lift them with cranes during the installation. Our engineering department needs to know this so they don't design machinery that is grossly unbalanced and difficult to pick up during the manufacturing process.