It's not necessary to reproject it to UTM. You can use the code below to calculate geodesic length and area for geometries under GCS. Since JavaScript API has client side method to convert from Web Mercator to GCS, so there is no client-server transaction needed. But please note, the result is not as accurate as geometry service returns since the client solution is a simple calculation based on spherical model.
geodesicLengths: function (polylines, lengthUnit) {
var radius = 6371.009 / 1.609344; // miles
var lengths = [];
dojo.forEach(polylines, function (polyline, idx) {
var length = 0;
dojo.forEach(polyline.paths, function (path, idx) {
var subLength = 0;
for (var i = 1; i < path.length; i++) {
var lon1 = path[i - 1][0] * Math.PI / 180;
var lon2 = path[0] * Math.PI / 180;
var lat1 = path[i - 1][1] * Math.PI / 180;
var lat2 = path[1] * Math.PI / 180;
var dLat = (lat2 - lat1);
var dLon = (lon2 - lon1);
var tempValue = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(lat1) * Math.cos(lat2) * Math.sin(dLon / 2) * Math.sin(dLon / 2);
var coefficient = 2 * Math.atan2(Math.sqrt(tempValue), Math.sqrt(1 - tempValue));
var distance = radius * coefficient;
subLength += distance;
}
length += subLength;
});
length *= esri.geometry.unitsDictionary[lengthUnit];
lengths.push(length);
});
return lengths;
},
geographicAreas: function (polygons, areaUnit) {
var radius = 6371009; //meters
var areas = [];
dojo.forEach(polygons, function (polygon, idx) {
var area = 0;
dojo.forEach(polygon.rings, function (ring, idx) {
var subArea = 0;
for (var i = 1; i < ring.length; i++) {
if (i < ring.length - 1) {
subArea += ((ring[i + 1][0] - ring[i - 1][0]) * Math.PI / 180) * Math.sin(ring[1] * Math.PI / 180);
}
else {
subArea += ((ring[1][0] - ring[i - 1][0]) * Math.PI / 180) * Math.sin(ring[1] * Math.PI / 180);
}
}
subArea *= radius * radius / 2 / 4046.87; //acres
area += subArea;
});
area *= esri.geometry.unitsDictionary[areaUnit];
areas.push(area);
});
return areas;
},