Can the iPhone screen can function as a weight?
I wonder if there is an option to use the iphone screen (via app of course) as a weight?
Yes, if you set the phone (screen down) on top of a stack of papers, it will weight them down and prevent them from blowing away.
I do this all the time. You don't even need an app or to call an API function to make it work.
In true Apple spirit, it Just Works, right out of the box.
Assuming you mean a scale. The accelerometer only measures acceleration, so it might detect a small spike when you step onto your phone, but it would not be able to tell you how much you weigh. To measure weight you'd have to measure something else, such as a how much you compress a device with a kind of spring or perhaps some kind of piezoelectronics in it (because this tells you how much force is applied, and assuming only gravity is applying this force you can calculate the mass). As far as I know iPhones have no such sensor in them.