Is it possible to get an example of two matrices Is it possible to get an example of two matrices $A,B\in M_4(\mathbb{R})$ both having $rank<2$ but $\det(A-\lambda B)\ne 0$ i.e it is not identically a zero polynomial. where $\lambda$ is indeterminate, I mean a variable. I want to say $(A-\lambda B)$ is of full rank matrix, assuming entries of $A-\lambda B$ is a polynomial matrix with linear polynomial.

No.  If $\operatorname{rank} A < 2$ then either $A = 0$ or $\operatorname{rank} A = 1$, and similarly for $B$.  Obviously if $A = 0$ then
$$\det(A - \lambda B) = - \lambda \det B = 0$$
since $B$ is not full-rank, and similarly if $B = 0$.
So suppose $\operatorname{rank} A = \operatorname{rank} B = 1$.  Then the image of $A$ is some one-dimensional space $\operatorname{span} \{ v\}$ and the image of $B$ is some one-dimensional space $\operatorname{span} \{ w\}$.  It follows that for any $u \in \mathbb{R}^4$
$$(A - \lambda B) u = A u - \lambda B u = c v + d w \in \operatorname{span}\{v,w\}$$
for some $c, d$.  In particular, $\operatorname{rank} (A - \lambda B)$ is at most two, and thus $\det (A - \lambda B)$ is always zero.

If you meant to say $\operatorname{rank} A \leq 2$ and $\operatorname{rank} B \leq 2$ instead, then the answer is yes; just take
$$A = \begin{pmatrix}
1 \\ 
& 1 \\ 
& & 0 \\
& & & 0 \end{pmatrix}, \qquad B = \begin{pmatrix}
0 \\ 
& 0 \\ 
& & 1 \\
& & & 1 \end{pmatrix}$$
for instance.  In fact, any random pair of rank-two matrices will have this property with 100% probability.
