Is it possible to write a custom text on Google Maps API v3 next to the marker, or I can use only the info window to do that?
By far the easiest way to add a Text Overlay is to use the MapLabel class from https://github.com/googlemaps/js-map-label
MapLabel
var mapLabel = new MapLabel({ text: 'Test', position: new google.maps.LatLng(50,50), map: map, fontSize: 20, align: 'right' });