Work is the result of a force on a point that moves through a distance. As the point moves, it follows a curve X, with a velocity v, at each instant. The small amount of work δW that occurs over an instant of time dt is calculated as
$\delta W = \mathbf{F}\cdot d\mathbf{s} = \mathbf{F}\cdot\mathbf{v}dt$
where the $F ⋅ v$ is the power over the instant $dt$. The sum of these small amounts of work over the trajectory of the point yields the work,
$W = \int_{t_1}^{t_2}\mathbf{F} \cdot \mathbf{v}dt = \int_{t_1}^{t_2}\mathbf{F} \cdot {\tfrac{d\mathbf{s}}{dt}}dt =\int_C \mathbf{F} \cdot d\mathbf{s}$
where $C$ is the trajectory from $x(t1)$ to $x(t2)$. This integral is computed along the trajectory of the particle, and is therefore said to be path dependent.
If the force is always directed along this line, and the magnitude of the force is $F$, then this integral simplifies to
$W = \int_C F\,ds$
where $s$ is distance along the line. If $F$ is constant, in addition to being directed along the line, then the integral simplifies further to
$W = \int_C F\,ds = F\int_C ds = Fs$
where $s$ is the distance traveled by the point along the line.
In your case you do not say if the force is being applied constantly or not. We only know that is has been applied. Since we don't know if the force has stopped we have to assume at least two cases. The first, the force is being a applied constantly over an indefinite period of time on the block on a frictionless surface and in this case its velocity is accelerating over and infinite time period and then yes the work done that is approaching an infinite quantity. Or second in the case where the force may have been stopped being applied after a certain period of time the block would cease accelerating and continue at a constant velocity. In this case the force would have a definite quantity.
To understand this better lets examine the Work Energy Principle :
The principle of work and kinetic energy (also known as the work–energy principle) states that the work done by all forces acting on a particle (the work of the resultant force) equals the change in the kinetic energy of the particle. That is, the work $W$ done by the resultant force on a particle equals the change in the particle's kinetic energy $E_k$,
$W=\Delta E_k=\tfrac12mv_2^2-\tfrac12mv_1^2$
where $v_1$ and $v_2$ are the speeds of the particle before and after the work is done and $m$ is its mass.
The derivation of the work–energy principle begins with Newton's second law and the resultant force on a particle which includes forces applied to the particle and constraint forces imposed on its movement. Computation of the scalar product of the forces with the velocity of the particle evaluates the instantaneous power added to the system.
For additional edification -
In the general case of rectilinear motion, when the net force F is not constant in magnitude, but is constant in direction, and parallel to the velocity of the particle, the work must be integrated along the path of the particle:
$W = \int_{t_1}^{t_2} \mathbf{F}\cdot \mathbf{v}dt = \int_{t_1}^{t_2} F \,v dt = \int_{t_1}^{t_2} ma \,v dt = m \int_{t_1}^{t_2} v \,{dv \over dt}\,dt = m \int_{v_1}^{v_2} v\,dv = \tfrac12 m (v_2^2 - v_1^2)$
Let's Examine your first statement -
"In physics, a force is said to do work if, when acting on a body, there is a displacement of the point of application in the direction of the force."
This true and for a point in time it is $\delta W$ as described above.
Next you say
"Also work is defined as the product of force and the displacement caused by the force. Now, if a block is kept on a frictionless surface and a force is exerted on it, it will travel indefinitely unless another unbalanced force acts on it."
OK but nothing is said about the time the force is applied. So as you can see we are left with answering a number of cases of time periods and also must cover a number of cases when the force is constant over time and when it is not but in the same direction. Hope the various methods of dealing with the potential cases in point have helped to show you the need for structuring your questions carefully.
And your question -
"Does this mean that the work done is infinite?"
Yes if the force is applied constantly or inconsistently over an infinite time period. No if it was only applied for a definite period of time.