not quite sure i understand the question
are you applying for a job now and the old job (which the reference might refer to) was months ago? don't see anything that unusual in this - some employers do want references from more than one past employer, especially if someone has had a few jobs in a short space of time.
or have you been in current job for months and employer is only now asking for a reference from a past employer?
that would be a bit unusual - not entirely sure it is illegal as such, although would have thought you have to give current employer permission to contact them. and can't say just what conclusions they would draw if you say no.
it's not unknown for a job offer to be made subject to references - and for offer (or employment if it has already started) to be withdrawn in the event of bad references.
the idea that "it's illegal to give a bad reference" is a fairly common urban myth - if a reference is false and /or malicious, then you can bring a claim, but if a reference is factual then it's still legal. (although some organisations have decided to avoid potential arguments by just confirming dates of employment)
you also (with a few exceptions, e.g. race / sex discrimination etc) don't have a lot of employment rights against unfair dismissal until you've got 2 years' continuous employment in.