First, try to get the seatpost out. You may need to pry the two ears slightly apart. Once you get the seatpost out, sand of the rusted area and take a proper measurement with your calipers. Most of the cheap China imports use 25.4mm steel seatpost. You may want to replace with a slightly longer aluminium ones. That will give you a wider range of height adjustment.
Use a wire brush to remove the rust from inside the frame. Lightly coat the new seatpost with grease. While the post is out you can straighten the two ears with a spanner or screwdriver. You could use a nut & bolt, allen screw & bolt or a quick-release seat post binder to secure the new seatpost to the frame.