I'm developing my own theme where I have fixed the left sidebar with my photo. Is it possible to force users to crop their image to a square during upload? If yes, how? What functions I will need?
Your assumption that all images are uploaded from a browser is false. Currently images can be uploaded via the XML-RPC protocol and once the REST API will be merged it will also be used to upload images.
Images can also be imported from other sites.
The point is that you should not assume that images are fitting the design. If you need images to look the best they can then you want not the cropped version but the full one and then let a pro designer to work on then to crop and fix them.