Is it possible to use as an external monitor 2013 iMac 21.5 late edition from MacBook Pro 2015?
Yes. You will need a Thunderbolt 2 cable. You will also need a keyboard and/or mouse for the 2013 iMac. This is required so you can enter the Command + F2 key combination to put the iMac is target display mode. Also, you will have to have installed a version for MacOS on the iMac that works with target display mode. Basically, High Sierra or an earlier version of macOS compatible with the the 2013 iMac. The 2015 MacBook Pro can have macOS unto the current version (Cataline) installed.
Note: It is possible to install a AppleScript application on the MacBook Pro, that will eliminate the need for the keyboard and/or mouse to be connected to the iMac. Basically, the AppleScript sends the Command + F2 key combination to the iMac over the Thunderbolt 2 cable.
One possible source for a Thunderbolt 2 cable is OWC.